aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 17:33:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 17:33:41 -0400
commit3e1f900bff40460d7bbab0ccd1a9efc3c70aee49 (patch)
treed0e2138ff61bdc9d1bd5b7ae5a1e75267d709afc /include
parent12795067cfa595434be0236b102a8eb20d578741 (diff)
parent0a87cf128f3d3bc6aa7b1040e73109c974ed875a (diff)
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: NFSv4: handle lack of clientaddr in option string NFSv4: debug print ntohl(status) in nfs client callback xdr code SUNRPC: Clean up the sillyrename code NFS: Introduce struct nfs_removeargs+nfs_removeres NFS: Use dentry->d_time to store the parent directory verifier. SUNRPC: move bkl locking and xdr proc invocation into a common helper NFSv4: Fix the nfsv4 readlink reply buffer alignment NFSv4: Fix the readdir reply buffer alignment NFSv4: More NFSv4 xdr cleanups NFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open NFSv4: 'constify' lookup arguments. NFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed NFSv4: Fix open state recovery NFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h4
-rw-r--r--include/linux/nfs_xdr.h32
-rw-r--r--include/linux/sunrpc/xdr.h16
3 files changed, 35 insertions, 17 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 */
410extern int nfs_async_unlink(struct dentry *); 410extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry);
411extern void nfs_complete_unlink(struct dentry *); 411extern 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 38d77681cf27..cf74a4db84a5 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -278,6 +278,21 @@ struct nfs_writeres {
278}; 278};
279 279
280/* 280/*
281 * Common arguments to the unlink call
282 */
283struct nfs_removeargs {
284 const struct nfs_fh *fh;
285 struct qstr name;
286 const u32 * bitmask;
287};
288
289struct nfs_removeres {
290 const struct nfs_server *server;
291 struct nfs4_change_info cinfo;
292 struct nfs_fattr dir_attr;
293};
294
295/*
281 * Argument struct for decode_entry function 296 * Argument struct for decode_entry function
282 */ 297 */
283struct nfs_entry { 298struct nfs_entry {
@@ -631,18 +646,6 @@ struct nfs4_readlink {
631 struct page ** pages; /* zero-copy data */ 646 struct page ** pages; /* zero-copy data */
632}; 647};
633 648
634struct nfs4_remove_arg {
635 const struct nfs_fh * fh;
636 const struct qstr * name;
637 const u32 * bitmask;
638};
639
640struct nfs4_remove_res {
641 const struct nfs_server * server;
642 struct nfs4_change_info cinfo;
643 struct nfs_fattr * dir_attr;
644};
645
646struct nfs4_rename_arg { 649struct nfs4_rename_arg {
647 const struct nfs_fh * old_dir; 650 const struct nfs_fh * old_dir;
648 const struct nfs_fh * new_dir; 651 const struct nfs_fh * new_dir;
@@ -788,9 +791,8 @@ struct nfs_rpc_ops {
788 int (*create) (struct inode *, struct dentry *, 791 int (*create) (struct inode *, struct dentry *,
789 struct iattr *, int, struct nameidata *); 792 struct iattr *, int, struct nameidata *);
790 int (*remove) (struct inode *, struct qstr *); 793 int (*remove) (struct inode *, struct qstr *);
791 int (*unlink_setup) (struct rpc_message *, 794 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
792 struct dentry *, struct qstr *); 795 int (*unlink_done) (struct rpc_task *, struct inode *);
793 int (*unlink_done) (struct dentry *, struct rpc_task *);
794 int (*rename) (struct inode *, struct qstr *, 796 int (*rename) (struct inode *, struct qstr *,
795 struct inode *, struct qstr *); 797 struct inode *, struct qstr *);
796 int (*link) (struct inode *, struct inode *, struct qstr *); 798 int (*link) (struct inode *, struct inode *, struct qstr *);
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 9e340fa23c06..c6b53d181bfa 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -12,6 +12,7 @@
12#include <linux/uio.h> 12#include <linux/uio.h>
13#include <asm/byteorder.h> 13#include <asm/byteorder.h>
14#include <linux/scatterlist.h> 14#include <linux/scatterlist.h>
15#include <linux/smp_lock.h>
15 16
16/* 17/*
17 * Buffer adjustment 18 * Buffer adjustment
@@ -36,6 +37,21 @@ struct xdr_netobj {
36typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); 37typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
37 38
38/* 39/*
40 * We're still requiring the BKL in the xdr code until it's been
41 * more carefully audited, at which point this wrapper will become
42 * unnecessary.
43 */
44static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj)
45{
46 int ret;
47
48 lock_kernel();
49 ret = xdrproc(rqstp, data, obj);
50 unlock_kernel();
51 return ret;
52}
53
54/*
39 * Basic structure for transmission/reception of a client XDR message. 55 * Basic structure for transmission/reception of a client XDR message.
40 * Features a header (for a linear buffer containing RPC headers 56 * Features a header (for a linear buffer containing RPC headers
41 * and the data payload for short messages), and then an array of 57 * and the data payload for short messages), and then an array of