summaryrefslogtreecommitdiff
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2011-09-16 03:06:52 +0400
committerroot <root@serles.lst.de>2011-10-28 16:59:00 +0400
commit79835a710d6ff811659c8de46f89c7577c3b8cc6 (patch)
tree0c0c3ab2fc4bfb506bc32e7afc18cad31e4086b9 /fs/nfs/file.c
parent4cce0e28b932c11454f75d1c1fae674600c23fbf (diff)
downloadlinux-79835a710d6ff811659c8de46f89c7577c3b8cc6.tar.xz
nfs: drop unnecessary locking in llseek
This makes NFS follow the standard generic_file_llseek locking scheme. Cc: Trond.Myklebust@netapp.com Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 12623abcf3d4..91c01f0a4c3b 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -180,8 +180,6 @@ force_reval:
static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin)
{
- loff_t loff;
-
dprintk("NFS: llseek file(%s/%s, %lld, %d)\n",
filp->f_path.dentry->d_parent->d_name.name,
filp->f_path.dentry->d_name.name,
@@ -197,14 +195,9 @@ static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin)
int retval = nfs_revalidate_file_size(inode, filp);
if (retval < 0)
return (loff_t)retval;
+ }
- /* AK: should drop this lock. Unlikely to be needed. */
- spin_lock(&inode->i_lock);
- loff = generic_file_llseek(filp, offset, origin);
- spin_unlock(&inode->i_lock);
- } else
- loff = generic_file_llseek(filp, offset, origin);
- return loff;
+ return generic_file_llseek(filp, offset, origin);
}
/*