X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfs%2Funlink.c;h=f92eeea330ff6e4169f26c3452a19444ffe475d0;hb=746550cff061581f89c687ada8523670768364f2;hp=b144021ee6ef5500477a44c760d0406148b18276;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index b144021ee..f92eeea33 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -180,7 +180,9 @@ nfs_async_unlink(struct dentry *dentry) task->tk_action = nfs_async_unlink_init; task->tk_release = nfs_async_unlink_release; + spin_lock(&dentry->d_lock); dentry->d_flags |= DCACHE_NFSFS_RENAMED; + spin_unlock(&dentry->d_lock); data->cred = rpcauth_lookupcred(clnt->cl_auth, 0); rpc_sleep_on(&nfs_delete_queue, task, NULL, NULL); @@ -210,7 +212,9 @@ nfs_complete_unlink(struct dentry *dentry) return; data->count++; nfs_copy_dname(dentry, data); + spin_lock(&dentry->d_lock); dentry->d_flags &= ~DCACHE_NFSFS_RENAMED; + spin_unlock(&dentry->d_lock); if (data->task.tk_rpcwait == &nfs_delete_queue) rpc_wake_up_task(&data->task); nfs_put_unlinkdata(data);