diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:03 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:03 -0500 |
commit | b92dccf65bab3b6b7deb79ff3321dc256eb0f53b (patch) | |
tree | 78a1436441bdfc1c2cc7928d9fdff50c0579013f /include/linux | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
NFS: Fix a busy inodes issue...
The nfs_open_context may live longer than the file descriptor that spawned
it, so it needs to carry a reference to the vfsmount. If not, then
generic_shutdown_super() may end up being called before reads and writes
have been flushed out.
Make a couple of functions static while we're at it...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nfs_fs.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index b4dc6e2e10c9..1161725d75e1 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -78,6 +78,7 @@ struct nfs_access_entry { | |||
78 | struct nfs4_state; | 78 | struct nfs4_state; |
79 | struct nfs_open_context { | 79 | struct nfs_open_context { |
80 | atomic_t count; | 80 | atomic_t count; |
81 | struct vfsmount *vfsmnt; | ||
81 | struct dentry *dentry; | 82 | struct dentry *dentry; |
82 | struct rpc_cred *cred; | 83 | struct rpc_cred *cred; |
83 | struct nfs4_state *state; | 84 | struct nfs4_state *state; |
@@ -311,12 +312,9 @@ extern void nfs_begin_attr_update(struct inode *); | |||
311 | extern void nfs_end_attr_update(struct inode *); | 312 | extern void nfs_end_attr_update(struct inode *); |
312 | extern void nfs_begin_data_update(struct inode *); | 313 | extern void nfs_begin_data_update(struct inode *); |
313 | extern void nfs_end_data_update(struct inode *); | 314 | extern void nfs_end_data_update(struct inode *); |
314 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred); | ||
315 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 315 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
316 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 316 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
317 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); | ||
318 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); | 317 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); |
319 | extern void nfs_file_clear_open_context(struct file *filp); | ||
320 | 318 | ||
321 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 319 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
322 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ | 320 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ |