]> err.no Git - linux-2.6/commitdiff
NFS: remove needless check in nfs_opendir()
authorCarsten Otte <cotte@de.ibm.com>
Wed, 19 Apr 2006 17:06:37 +0000 (13:06 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 19 Apr 2006 17:06:37 +0000 (13:06 -0400)
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>
fs/nfs/dir.c

index a23f3489416709288655f80603337f91ea94e398..cae74dd4c7f51f6bd674c5e61bad36c415cb4460 100644 (file)
@@ -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;
 }