summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-04-02 02:26:52 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-04-19 22:53:52 +0200
commitc4d7c402b788b73dc24f1e54a57f89d3dc5eb7bc (patch)
tree51c0e7fa84f7eff745dc17a7bffd81adb3d207d3 /fs/nfs
parentNLM/lockd: Fix a race when cancelling a blocking lock (diff)
downloadlinux-c4d7c402b788b73dc24f1e54a57f89d3dc5eb7bc.tar.xz
linux-c4d7c402b788b73dc24f1e54a57f89d3dc5eb7bc.zip
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/nfs')
-rw-r--r--fs/nfs/file.c12
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)
lock_kernel();
/* Use local locking if mounted with "-onolock" */
- if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) {
+ if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM))
status = NFS_PROTO(inode)->lock(filp, cmd, fl);
- /* If we were signalled we still need to ensure that
- * we clean up any state on the server. We therefore
- * record the lock call as having succeeded in order to
- * ensure that locks_remove_posix() cleans it out when
- * the process exits.
- */
- if (status == -EINTR || status == -ERESTARTSYS)
- do_vfs_lock(filp, fl);
- } else
+ else
status = do_vfs_lock(filp, fl);
unlock_kernel();
if (status < 0)