Merge branch 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / fs / nfs / inode.c
index a7fb076..5a8854d 100644 (file)
@@ -335,7 +335,7 @@ nfs_find_actor(struct inode *inode, void *opaque)
 
        if (NFS_FILEID(inode) != fattr->fileid)
                return 0;
-       if ((S_IFMT & inode->i_mode) != (S_IFMT & fattr->mode))
+       if (inode_wrong_type(inode, fattr->mode))
                return 0;
        if (nfs_compare_fh(NFS_FH(inode), fh))
                return 0;
@@ -1461,7 +1461,7 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
                        return 0;
                return -ESTALE;
        }
-       if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT))
+       if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && inode_wrong_type(inode, fattr->mode))
                return -ESTALE;
 
 
@@ -1876,7 +1876,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        /*
         * Make sure the inode's type hasn't changed.
         */
-       if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) {
+       if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && inode_wrong_type(inode, fattr->mode)) {
                /*
                * Big trouble! The inode has become a different object.
                */