summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index a6860e1f7bff..57ccbd277fce 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -303,10 +303,10 @@ static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
status = NFS_PROTO(inode)->lock(filp, cmd, fl);
else {
struct file_lock *cfl = posix_test_lock(filp, fl);
- if (cfl != NULL) {
+
+ fl->fl_type = F_UNLCK;
+ if (cfl != NULL)
memcpy(fl, cfl, sizeof(*fl));
- fl->fl_type = F_UNLCK;
- }
}
unlock_kernel();
return status;