summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2004-02-07 17:00:45 +0100
committerTrond Myklebust <trond.myklebust@fys.uio.no>2004-02-07 17:00:45 +0100
commit5bb0bc7c89ec7d694cd77487fe26f004ee0d0bb7 (patch)
tree3407b44dfe3528374922c76e668ad25547084afb /include/linux
parentab91d13dcba1d0b69394fa1b0a3b034db71316ca (diff)
NFSv4: Atomic open(). Fixes races w.r.t. opening files.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs.h6
-rw-r--r--include/linux/nfs_xdr.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 3efc91b200e6..0605e9c63026 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -558,6 +558,9 @@ struct nfs4_state {
};
+extern struct dentry_operations nfs4_dentry_operations;
+extern struct inode_operations nfs4_dir_inode_operations;
+
/* nfs4proc.c */
extern int nfs4_proc_setclientid(struct nfs4_client *, u32, unsigned short);
extern int nfs4_proc_setclientid_confirm(struct nfs4_client *);
@@ -566,6 +569,8 @@ extern int nfs4_proc_async_renew(struct nfs4_client *);
extern int nfs4_proc_renew(struct nfs4_client *);
extern int nfs4_do_close(struct inode *, struct nfs4_state *);
extern int nfs4_wait_clnt_recover(struct rpc_clnt *, struct nfs4_client *);
+extern struct inode *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *);
+extern int nfs4_open_revalidate(struct inode *, struct dentry *, int);
/* nfs4renewd.c */
extern void nfs4_schedule_state_renewal(struct nfs4_client *);
@@ -581,6 +586,7 @@ extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struc
extern void nfs4_put_state_owner(struct nfs4_state_owner *);
extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *);
extern void nfs4_put_open_state(struct nfs4_state *);
+extern struct nfs4_state *nfs4_find_state_bypid(struct inode *, pid_t);
extern void nfs4_increment_seqid(int status, struct nfs4_state_owner *sp);
extern int nfs4_handle_error(struct nfs_server *, int);
extern void nfs4_schedule_state_recovery(struct nfs4_client *);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 242b50436d92..4393ae7c305d 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -637,6 +637,8 @@ struct nfs_page;
*/
struct nfs_rpc_ops {
int version; /* Protocol version */
+ struct dentry_operations *dentry_ops;
+ struct inode_operations *dir_inode_ops;
int (*getroot) (struct nfs_server *, struct nfs_fh *,
struct nfs_fattr *);