From c1841d5889ad76789eead18efcd9325bce27e690 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Wed, 11 Jun 2008 17:55:34 -0400 Subject: [PATCH] --- yaml --- r: 101909 b: refs/heads/master c: b84e06c58fdefdc42931f771dc295e63f4b27365 h: refs/heads/master i: 101907: 00aa7680f05551dd7b585fd20e670621b970d110 v: v3 --- [refs] | 2 +- trunk/fs/nfs/dir.c | 12 ++++++++++-- trunk/fs/nfs/file.c | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0d8bd1b8814e..8c064e055c1e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 549177863bac22f23663ee9f70c4e3b9fb269f2c +refs/heads/master: b84e06c58fdefdc42931f771dc295e63f4b27365 diff --git a/trunk/fs/nfs/dir.c b/trunk/fs/nfs/dir.c index 5d73fbd67070..24571067bf72 100644 --- a/trunk/fs/nfs/dir.c +++ b/trunk/fs/nfs/dir.c @@ -603,7 +603,15 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) 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; } diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index 1789de218cca..cef36362c9eb 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -170,6 +170,11 @@ 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) { + dfprintk(VFS, "NFS: llseek file(%s/%s, %lld, %d)\n", + filp->f_path.dentry->d_parent->d_name.name, + filp->f_path.dentry->d_name.name, + offset, origin); + /* origin == SEEK_END => we must revalidate the cached file length */ if (origin == SEEK_END) { struct inode *inode = filp->f_mapping->host;