diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-14 15:39:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-19 15:21:39 -0400 |
commit | e4eff1a622edd6ab7b73acd5d8763aa2fa3fee49 (patch) | |
tree | 257d6675733d4af122a77054281e1d7d5062d904 /include | |
parent | 4fdc17b2a7f4d9db5b08e0f963d0027f714e4104 (diff) |
SUNRPC: Clean up the sillyrename code
Fix a couple of bugs:
- Don't rely on the parent dentry still being valid when the call completes.
Fixes a race with shrink_dcache_for_umount_subtree()
- Don't remove the file if the filehandle has been labelled as stale.
Fix a couple of inefficiencies
- Remove the global list of sillyrenamed files. Instead we can cache the
sillyrename information in the dentry->d_fsdata
- Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_fs.h | 4 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c098ae194f79..9ba4aec37c50 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -407,8 +407,8 @@ extern void nfs_release_automount_timer(void); | |||
407 | /* | 407 | /* |
408 | * linux/fs/nfs/unlink.c | 408 | * linux/fs/nfs/unlink.c |
409 | */ | 409 | */ |
410 | extern int nfs_async_unlink(struct dentry *); | 410 | extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry); |
411 | extern void nfs_complete_unlink(struct dentry *); | 411 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); |
412 | 412 | ||
413 | /* | 413 | /* |
414 | * linux/fs/nfs/write.c | 414 | * linux/fs/nfs/write.c |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 7babcb16300b..cf74a4db84a5 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -791,9 +791,8 @@ struct nfs_rpc_ops { | |||
791 | int (*create) (struct inode *, struct dentry *, | 791 | int (*create) (struct inode *, struct dentry *, |
792 | struct iattr *, int, struct nameidata *); | 792 | struct iattr *, int, struct nameidata *); |
793 | int (*remove) (struct inode *, struct qstr *); | 793 | int (*remove) (struct inode *, struct qstr *); |
794 | int (*unlink_setup) (struct rpc_message *, | 794 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
795 | struct dentry *, struct qstr *); | 795 | int (*unlink_done) (struct rpc_task *, struct inode *); |
796 | int (*unlink_done) (struct dentry *, struct rpc_task *); | ||
797 | int (*rename) (struct inode *, struct qstr *, | 796 | int (*rename) (struct inode *, struct qstr *, |
798 | struct inode *, struct qstr *); | 797 | struct inode *, struct qstr *); |
799 | int (*link) (struct inode *, struct inode *, struct qstr *); | 798 | int (*link) (struct inode *, struct inode *, struct qstr *); |