]> err.no Git - linux-2.6/blobdiff - fs/nfs/delegation.c
mm: Remove slab destructors from kmem_cache_create().
[linux-2.6] / fs / nfs / delegation.c
index 56f4f6a99d4ef365b79b5a2a7e1450f1ce039d9c..20ac403469a02b11998d553a6e54af63c92f20c2 100644 (file)
@@ -124,10 +124,6 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct
        struct nfs_delegation *delegation;
        int status = 0;
 
-       /* Ensure we first revalidate the attributes and page cache! */
-       if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR)))
-               __nfs_revalidate_inode(NFS_SERVER(inode), inode);
-
        delegation = kmalloc(sizeof(*delegation), GFP_KERNEL);
        if (delegation == NULL)
                return -ENOMEM;
@@ -154,6 +150,12 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct
                        status = -EIO;
                }
        }
+
+       /* Ensure we revalidate the attributes and page cache! */
+       spin_lock(&inode->i_lock);
+       nfsi->cache_validity |= NFS_INO_REVAL_FORCED;
+       spin_unlock(&inode->i_lock);
+
        spin_unlock(&clp->cl_lock);
        kfree(delegation);
        return status;