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>
This commit is contained in:
parent
4fdc17b2a7
commit
e4eff1a622
7 changed files with 119 additions and 201 deletions
|
@ -407,8 +407,8 @@ extern void nfs_release_automount_timer(void);
|
|||
/*
|
||||
* linux/fs/nfs/unlink.c
|
||||
*/
|
||||
extern int nfs_async_unlink(struct dentry *);
|
||||
extern void nfs_complete_unlink(struct dentry *);
|
||||
extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry);
|
||||
extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
|
||||
|
||||
/*
|
||||
* linux/fs/nfs/write.c
|
||||
|
|
|
@ -791,9 +791,8 @@ struct nfs_rpc_ops {
|
|||
int (*create) (struct inode *, struct dentry *,
|
||||
struct iattr *, int, struct nameidata *);
|
||||
int (*remove) (struct inode *, struct qstr *);
|
||||
int (*unlink_setup) (struct rpc_message *,
|
||||
struct dentry *, struct qstr *);
|
||||
int (*unlink_done) (struct dentry *, struct rpc_task *);
|
||||
void (*unlink_setup) (struct rpc_message *, struct inode *dir);
|
||||
int (*unlink_done) (struct rpc_task *, struct inode *);
|
||||
int (*rename) (struct inode *, struct qstr *,
|
||||
struct inode *, struct qstr *);
|
||||
int (*link) (struct inode *, struct inode *, struct qstr *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue