Skip to content

Commit

Permalink
NFS: Make nfs_open methods consistent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jul 9, 2008
1 parent b84e06c commit cc0dd2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cc0dd2d

Please sign in to comment.