aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:03 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:03 -0500
commitb92dccf65bab3b6b7deb79ff3321dc256eb0f53b (patch)
tree78a1436441bdfc1c2cc7928d9fdff50c0579013f /include
parent7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (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')
-rw-r--r--include/linux/nfs_fs.h4
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 {
78struct nfs4_state; 78struct nfs4_state;
79struct nfs_open_context { 79struct 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 *);
311extern void nfs_end_attr_update(struct inode *); 312extern void nfs_end_attr_update(struct inode *);
312extern void nfs_begin_data_update(struct inode *); 313extern void nfs_begin_data_update(struct inode *);
313extern void nfs_end_data_update(struct inode *); 314extern void nfs_end_data_update(struct inode *);
314extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred);
315extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); 315extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
316extern void put_nfs_open_context(struct nfs_open_context *ctx); 316extern void put_nfs_open_context(struct nfs_open_context *ctx);
317extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx);
318extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); 317extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode);
319extern 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. */
322extern u32 root_nfs_parse_addr(char *name); /*__init*/ 320extern u32 root_nfs_parse_addr(char *name); /*__init*/