]> err.no Git - linux-2.6/blobdiff - fs/gfs2/ops_file.c
locks: give posix_test_lock same interface as ->lock
[linux-2.6] / fs / gfs2 / ops_file.c
index b50180e227790115f0e6b12570b0c9bedc14614c..48b248d7c8235b7991e6cbdbf7914f3959eb12a0 100644 (file)
@@ -513,12 +513,7 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
 
        if (sdp->sd_args.ar_localflocks) {
                if (IS_GETLK(cmd)) {
-                       struct file_lock tmp;
-                       int ret;
-                       ret = posix_test_lock(file, fl, &tmp);
-                       fl->fl_type = F_UNLCK;
-                       if (ret)
-                               memcpy(fl, &tmp, sizeof(struct file_lock));
+                       posix_test_lock(file, fl);
                        return 0;
                } else {
                        return posix_lock_file_wait(file, fl);