Commit 79835a71 authored by Andi Kleen's avatar Andi Kleen Committed by root

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: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 4cce0e28
...@@ -180,8 +180,6 @@ static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) ...@@ -180,8 +180,6 @@ static int nfs_revalidate_file_size(struct inode *inode, struct file *filp)
static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) 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", dprintk("NFS: llseek file(%s/%s, %lld, %d)\n",
filp->f_path.dentry->d_parent->d_name.name, filp->f_path.dentry->d_parent->d_name.name,
filp->f_path.dentry->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) ...@@ -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); int retval = nfs_revalidate_file_size(inode, filp);
if (retval < 0) if (retval < 0)
return (loff_t)retval; return (loff_t)retval;
}
/* AK: should drop this lock. Unlikely to be needed. */ return generic_file_llseek(filp, offset, origin);
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;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment