diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-01 20:26:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-19 16:53:52 -0400 |
commit | c4d7c402b788b73dc24f1e54a57f89d3dc5eb7bc (patch) | |
tree | 51c0e7fa84f7eff745dc17a7bffd81adb3d207d3 /fs | |
parent | 5f50c0c6d644d6c8180d9079c13c5d9de3adeb34 (diff) |
NFS: Remove the buggy lock-if-signalled case from do_setlk()
Both NLM and NFSv4 should be able to clean up adequately in the case where
the user interrupts the RPC call...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/file.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 10e8b807e7ff..742cb745cb47 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -566,17 +566,9 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) | |||
566 | 566 | ||
567 | lock_kernel(); | 567 | lock_kernel(); |
568 | /* Use local locking if mounted with "-onolock" */ | 568 | /* Use local locking if mounted with "-onolock" */ |
569 | if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) { | 569 | if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) |
570 | status = NFS_PROTO(inode)->lock(filp, cmd, fl); | 570 | status = NFS_PROTO(inode)->lock(filp, cmd, fl); |
571 | /* If we were signalled we still need to ensure that | 571 | else |
572 | * we clean up any state on the server. We therefore | ||
573 | * record the lock call as having succeeded in order to | ||
574 | * ensure that locks_remove_posix() cleans it out when | ||
575 | * the process exits. | ||
576 | */ | ||
577 | if (status == -EINTR || status == -ERESTARTSYS) | ||
578 | do_vfs_lock(filp, fl); | ||
579 | } else | ||
580 | status = do_vfs_lock(filp, fl); | 572 | status = do_vfs_lock(filp, fl); |
581 | unlock_kernel(); | 573 | unlock_kernel(); |
582 | if (status < 0) | 574 | if (status < 0) |