]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
NFS: Make nfs_open methods consistent
authorChuck Lever <chuck.lever@oracle.com>
Wed, 11 Jun 2008 21:55:42 +0000 (17:55 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 9 Jul 2008 16:09:02 +0000 (12:09 -0400)
Clean up: Report the same debugging info and count function calls the
same for files and directories in nfs_opendir() and nfs_file_open().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
fs/nfs/file.c

index 24571067bf7220db3c04775f024b8d1a65286b7c..c962233c094ad28623d5a664f66227a2fb9fee7b 100644 (file)
@@ -133,8 +133,11 @@ nfs_opendir(struct inode *inode, struct file *filp)
 {
        int res;
 
-       dfprintk(VFS, "NFS: opendir(%s/%ld)\n",
-                       inode->i_sb->s_id, inode->i_ino);
+       dfprintk(VFS, "NFS: open dir(%s/%s)\n",
+                       filp->f_path.dentry->d_parent->d_name.name,
+                       filp->f_path.dentry->d_name.name);
+
+       nfs_inc_stats(inode, NFSIOS_VFSOPEN);
 
        lock_kernel();
        /* Call generic open code in order to cache credentials */
index cef36362c9ebd7c3678539a14ea9c864a793bcfb..202408d96ee89f0346d3a66ee8892d87502dd649 100644 (file)
@@ -119,6 +119,10 @@ nfs_file_open(struct inode *inode, struct file *filp)
 {
        int res;
 
+       dfprintk(VFS, "NFS: open file(%s/%s)\n",
+                       filp->f_path.dentry->d_parent->d_name.name,
+                       filp->f_path.dentry->d_name.name);
+
        res = nfs_check_flags(filp->f_flags);
        if (res)
                return res;