diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-06-11 21:55:34 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 16:09:01 (GMT) |
commit | b84e06c58fdefdc42931f771dc295e63f4b27365 (patch) | |
tree | 1018cbbb7559b928ee1ae7e29663de81ba56ef6b /fs/nfs/dir.c | |
parent | 549177863bac22f23663ee9f70c4e3b9fb269f2c (diff) | |
download | linux-fsl-qoriq-b84e06c58fdefdc42931f771dc295e63f4b27365.tar.xz |
NFS: Make nfs_llseek methods consistent
Clean up: Report the same debugging info in nfs_llseek_dir() and
nfs_llseek_file().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5d73fbd..2457106 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -603,7 +603,15 @@ out: static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) { - mutex_lock(&filp->f_path.dentry->d_inode->i_mutex); + struct dentry *dentry = filp->f_path.dentry; + struct inode *inode = dentry->d_inode; + + dfprintk(VFS, "NFS: llseek dir(%s/%s, %lld, %d)\n", + dentry->d_parent->d_name.name, + dentry->d_name.name, + offset, origin); + + mutex_lock(&inode->i_mutex); switch (origin) { case 1: offset += filp->f_pos; @@ -619,7 +627,7 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) nfs_file_open_context(filp)->dir_cookie = 0; } out: - mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex); + mutex_unlock(&inode->i_mutex); return offset; } |