Skip to content

Commit

Permalink
NFS: remove needless check in nfs_opendir()
Browse files Browse the repository at this point in the history
Local variable res was initialized to 0 - no check needed here.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Carsten Otte authored and Trond Myklebust committed Apr 19, 2006
1 parent b9d9506 commit 7451c4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ struct inode_operations nfs4_dir_inode_operations = {
static int
nfs_opendir(struct inode *inode, struct file *filp)
{
int res = 0;
int res;

dfprintk(VFS, "NFS: opendir(%s/%ld)\n",
inode->i_sb->s_id, inode->i_ino);

lock_kernel();
/* Call generic open code in order to cache credentials */
if (!res)
res = nfs_open(inode, filp);
res = nfs_open(inode, filp);
unlock_kernel();
return res;
}
Expand Down

0 comments on commit 7451c4f

Please sign in to comment.