diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 12 | ||||
-rw-r--r-- | fs/nfs/file.c | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5d73fbd67070..24571067bf72 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -603,7 +603,15 @@ out: | |||
603 | 603 | ||
604 | static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | 604 | static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) |
605 | { | 605 | { |
606 | mutex_lock(&filp->f_path.dentry->d_inode->i_mutex); | 606 | struct dentry *dentry = filp->f_path.dentry; |
607 | struct inode *inode = dentry->d_inode; | ||
608 | |||
609 | dfprintk(VFS, "NFS: llseek dir(%s/%s, %lld, %d)\n", | ||
610 | dentry->d_parent->d_name.name, | ||
611 | dentry->d_name.name, | ||
612 | offset, origin); | ||
613 | |||
614 | mutex_lock(&inode->i_mutex); | ||
607 | switch (origin) { | 615 | switch (origin) { |
608 | case 1: | 616 | case 1: |
609 | offset += filp->f_pos; | 617 | offset += filp->f_pos; |
@@ -619,7 +627,7 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | |||
619 | nfs_file_open_context(filp)->dir_cookie = 0; | 627 | nfs_file_open_context(filp)->dir_cookie = 0; |
620 | } | 628 | } |
621 | out: | 629 | out: |
622 | mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex); | 630 | mutex_unlock(&inode->i_mutex); |
623 | return offset; | 631 | return offset; |
624 | } | 632 | } |
625 | 633 | ||
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 1789de218cca..cef36362c9eb 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -170,6 +170,11 @@ force_reval: | |||
170 | 170 | ||
171 | static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) | 171 | static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) |
172 | { | 172 | { |
173 | dfprintk(VFS, "NFS: llseek file(%s/%s, %lld, %d)\n", | ||
174 | filp->f_path.dentry->d_parent->d_name.name, | ||
175 | filp->f_path.dentry->d_name.name, | ||
176 | offset, origin); | ||
177 | |||
173 | /* origin == SEEK_END => we must revalidate the cached file length */ | 178 | /* origin == SEEK_END => we must revalidate the cached file length */ |
174 | if (origin == SEEK_END) { | 179 | if (origin == SEEK_END) { |
175 | struct inode *inode = filp->f_mapping->host; | 180 | struct inode *inode = filp->f_mapping->host; |