Commit cc0dd2d1 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

NFS: Make nfs_open methods consistent

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent b84e06c5
...@@ -133,8 +133,11 @@ nfs_opendir(struct inode *inode, struct file *filp) ...@@ -133,8 +133,11 @@ nfs_opendir(struct inode *inode, struct file *filp)
{ {
int res; int res;
dfprintk(VFS, "NFS: opendir(%s/%ld)\n", dfprintk(VFS, "NFS: open dir(%s/%s)\n",
inode->i_sb->s_id, inode->i_ino); filp->f_path.dentry->d_parent->d_name.name,
filp->f_path.dentry->d_name.name);
nfs_inc_stats(inode, NFSIOS_VFSOPEN);
lock_kernel(); lock_kernel();
/* Call generic open code in order to cache credentials */ /* Call generic open code in order to cache credentials */
......
...@@ -119,6 +119,10 @@ nfs_file_open(struct inode *inode, struct file *filp) ...@@ -119,6 +119,10 @@ nfs_file_open(struct inode *inode, struct file *filp)
{ {
int res; 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); res = nfs_check_flags(filp->f_flags);
if (res) if (res)
return res; return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment