diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 982a2064fe4c..b1940660502f 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -133,8 +133,11 @@ nfs_opendir(struct inode *inode, struct file *filp) | |||
133 | { | 133 | { |
134 | int res; | 134 | int res; |
135 | 135 | ||
136 | dfprintk(VFS, "NFS: opendir(%s/%ld)\n", | 136 | dfprintk(FILE, "NFS: open dir(%s/%s)\n", |
137 | inode->i_sb->s_id, inode->i_ino); | 137 | filp->f_path.dentry->d_parent->d_name.name, |
138 | filp->f_path.dentry->d_name.name); | ||
139 | |||
140 | nfs_inc_stats(inode, NFSIOS_VFSOPEN); | ||
138 | 141 | ||
139 | lock_kernel(); | 142 | lock_kernel(); |
140 | /* Call generic open code in order to cache credentials */ | 143 | /* Call generic open code in order to cache credentials */ |
@@ -528,7 +531,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
528 | struct nfs_fattr fattr; | 531 | struct nfs_fattr fattr; |
529 | long res; | 532 | long res; |
530 | 533 | ||
531 | dfprintk(VFS, "NFS: readdir(%s/%s) starting at cookie %Lu\n", | 534 | dfprintk(FILE, "NFS: readdir(%s/%s) starting at cookie %llu\n", |
532 | dentry->d_parent->d_name.name, dentry->d_name.name, | 535 | dentry->d_parent->d_name.name, dentry->d_name.name, |
533 | (long long)filp->f_pos); | 536 | (long long)filp->f_pos); |
534 | nfs_inc_stats(inode, NFSIOS_VFSGETDENTS); | 537 | nfs_inc_stats(inode, NFSIOS_VFSGETDENTS); |
@@ -595,7 +598,7 @@ out: | |||
595 | unlock_kernel(); | 598 | unlock_kernel(); |
596 | if (res > 0) | 599 | if (res > 0) |
597 | res = 0; | 600 | res = 0; |
598 | dfprintk(VFS, "NFS: readdir(%s/%s) returns %ld\n", | 601 | dfprintk(FILE, "NFS: readdir(%s/%s) returns %ld\n", |
599 | dentry->d_parent->d_name.name, dentry->d_name.name, | 602 | dentry->d_parent->d_name.name, dentry->d_name.name, |
600 | res); | 603 | res); |
601 | return res; | 604 | return res; |
@@ -603,7 +606,15 @@ out: | |||
603 | 606 | ||
604 | static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | 607 | static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) |
605 | { | 608 | { |
606 | mutex_lock(&filp->f_path.dentry->d_inode->i_mutex); | 609 | struct dentry *dentry = filp->f_path.dentry; |
610 | struct inode *inode = dentry->d_inode; | ||
611 | |||
612 | dfprintk(FILE, "NFS: llseek dir(%s/%s, %lld, %d)\n", | ||
613 | dentry->d_parent->d_name.name, | ||
614 | dentry->d_name.name, | ||
615 | offset, origin); | ||
616 | |||
617 | mutex_lock(&inode->i_mutex); | ||
607 | switch (origin) { | 618 | switch (origin) { |
608 | case 1: | 619 | case 1: |
609 | offset += filp->f_pos; | 620 | offset += filp->f_pos; |
@@ -619,7 +630,7 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | |||
619 | nfs_file_open_context(filp)->dir_cookie = 0; | 630 | nfs_file_open_context(filp)->dir_cookie = 0; |
620 | } | 631 | } |
621 | out: | 632 | out: |
622 | mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex); | 633 | mutex_unlock(&inode->i_mutex); |
623 | return offset; | 634 | return offset; |
624 | } | 635 | } |
625 | 636 | ||
@@ -629,10 +640,11 @@ out: | |||
629 | */ | 640 | */ |
630 | static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) | 641 | static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) |
631 | { | 642 | { |
632 | dfprintk(VFS, "NFS: fsync_dir(%s/%s) datasync %d\n", | 643 | dfprintk(FILE, "NFS: fsync dir(%s/%s) datasync %d\n", |
633 | dentry->d_parent->d_name.name, dentry->d_name.name, | 644 | dentry->d_parent->d_name.name, dentry->d_name.name, |
634 | datasync); | 645 | datasync); |
635 | 646 | ||
647 | nfs_inc_stats(dentry->d_inode, NFSIOS_VFSFSYNC); | ||
636 | return 0; | 648 | return 0; |
637 | } | 649 | } |
638 | 650 | ||