NFS: use ERR_CAST()
authorNamhyung Kim <namhyung@gmail.com>
Tue, 28 Dec 2010 17:02:46 +0000 (17:02 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 4 Jan 2011 18:10:39 +0000 (13:10 -0500)
Use ERR_CAST() intead of wierd-looking cast.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c

index 3e2123fe79f55fa5b6ec302bfd7b6d6682e20284..831d61c4449b296938ecbb3b42bf7de65450d204 100644 (file)
@@ -1218,7 +1218,7 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru
                goto out_unblock_sillyrename;
        }
        inode = nfs_fhget(dentry->d_sb, fhandle, fattr);
-       res = (struct dentry *)inode;
+       res = ERR_CAST(inode);
        if (IS_ERR(res))
                goto out_unblock_sillyrename;