diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-05 16:25:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-05 16:25:45 -0500 |
commit | cc7889ff5ee7a1c1a2b5073c53db5ad9b76f14e2 (patch) | |
tree | 647e11872abe7c20c0145de9adbb60f15085dad0 /net | |
parent | b13d3c6e8ab6ac53e8c1858a9c837cb6ba3bbef0 (diff) | |
parent | 3fa04ecd72780da31ba8b329e148179bc24a9c7d (diff) |
Merge branch 'nfs-for-2.6.34' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.34' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (44 commits)
NFS: Remove requirement for inode->i_mutex from nfs_invalidate_mapping
NFS: Clean up nfs_sync_mapping
NFS: Simplify nfs_wb_page()
NFS: Replace __nfs_write_mapping with sync_inode()
NFS: Simplify nfs_wb_page_cancel()
NFS: Ensure inode is always marked I_DIRTY_DATASYNC, if it has unstable pages
NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is set
NFS: Reduce the number of unnecessary COMMIT calls
NFS: Add a count of the number of unstable writes carried by an inode
NFS: Cleanup - move nfs_write_inode() into fs/nfs/write.c
nfs41 fix NFS4ERR_CLID_INUSE for exchange id
NFS: Fix an allocation-under-spinlock bug
SUNRPC: Handle EINVAL error returns from the TCP connect operation
NFSv4.1: Various fixes to the sequence flag error handling
nfs4: renewd renew operations should take/put a client reference
nfs41: renewd sequence operations should take/put client reference
nfs: prevent backlogging of renewd requests
nfs: kill renewd before clearing client minor version
NFS: Make close(2) asynchronous when closing NFS O_DIRECT files
NFS: Improve NFS iostat byte count accuracy for writes
...
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/addr.c | 8 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 11 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 9 |
4 files changed, 24 insertions, 8 deletions
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 6dcdd2517819..f845d9d72f73 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c | |||
@@ -71,8 +71,9 @@ static size_t rpc_ntop6(const struct sockaddr *sap, | |||
71 | if (unlikely(len == 0)) | 71 | if (unlikely(len == 0)) |
72 | return len; | 72 | return len; |
73 | 73 | ||
74 | if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) && | 74 | if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)) |
75 | !(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_SITELOCAL)) | 75 | return len; |
76 | if (sin6->sin6_scope_id == 0) | ||
76 | return len; | 77 | return len; |
77 | 78 | ||
78 | rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u", | 79 | rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u", |
@@ -165,8 +166,7 @@ static int rpc_parse_scope_id(const char *buf, const size_t buflen, | |||
165 | if (*delim != IPV6_SCOPE_DELIMITER) | 166 | if (*delim != IPV6_SCOPE_DELIMITER) |
166 | return 0; | 167 | return 0; |
167 | 168 | ||
168 | if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) && | 169 | if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)) |
169 | !(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_SITELOCAL)) | ||
170 | return 0; | 170 | return 0; |
171 | 171 | ||
172 | len = (buf + buflen) - delim - 1; | 172 | len = (buf + buflen) - delim - 1; |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index f7a7f8380e38..0cfccc2a0297 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -206,8 +206,14 @@ gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct | |||
206 | ctx->gc_win = window_size; | 206 | ctx->gc_win = window_size; |
207 | /* gssd signals an error by passing ctx->gc_win = 0: */ | 207 | /* gssd signals an error by passing ctx->gc_win = 0: */ |
208 | if (ctx->gc_win == 0) { | 208 | if (ctx->gc_win == 0) { |
209 | /* in which case, p points to an error code which we ignore */ | 209 | /* |
210 | p = ERR_PTR(-EACCES); | 210 | * in which case, p points to an error code. Anything other |
211 | * than -EKEYEXPIRED gets converted to -EACCES. | ||
212 | */ | ||
213 | p = simple_get_bytes(p, end, &ret, sizeof(ret)); | ||
214 | if (!IS_ERR(p)) | ||
215 | p = (ret == -EKEYEXPIRED) ? ERR_PTR(-EKEYEXPIRED) : | ||
216 | ERR_PTR(-EACCES); | ||
211 | goto err; | 217 | goto err; |
212 | } | 218 | } |
213 | /* copy the opaque wire context */ | 219 | /* copy the opaque wire context */ |
@@ -646,6 +652,7 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | |||
646 | err = PTR_ERR(p); | 652 | err = PTR_ERR(p); |
647 | switch (err) { | 653 | switch (err) { |
648 | case -EACCES: | 654 | case -EACCES: |
655 | case -EKEYEXPIRED: | ||
649 | gss_msg->msg.errno = err; | 656 | gss_msg->msg.errno = err; |
650 | err = mlen; | 657 | err = mlen; |
651 | break; | 658 | break; |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 538ca433a56c..6dcf8c9c784c 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -506,6 +506,10 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) | |||
506 | { | 506 | { |
507 | unsigned int pages, arghi; | 507 | unsigned int pages, arghi; |
508 | 508 | ||
509 | /* bc_xprt uses fore channel allocated buffers */ | ||
510 | if (svc_is_backchannel(rqstp)) | ||
511 | return 1; | ||
512 | |||
509 | pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. | 513 | pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. |
510 | * We assume one is at most one page | 514 | * We assume one is at most one page |
511 | */ | 515 | */ |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 3d739e5d15d8..712412982cee 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1912,6 +1912,11 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt, | |||
1912 | case -EALREADY: | 1912 | case -EALREADY: |
1913 | xprt_clear_connecting(xprt); | 1913 | xprt_clear_connecting(xprt); |
1914 | return; | 1914 | return; |
1915 | case -EINVAL: | ||
1916 | /* Happens, for instance, if the user specified a link | ||
1917 | * local IPv6 address without a scope-id. | ||
1918 | */ | ||
1919 | goto out; | ||
1915 | } | 1920 | } |
1916 | out_eagain: | 1921 | out_eagain: |
1917 | status = -EAGAIN; | 1922 | status = -EAGAIN; |
@@ -2100,7 +2105,7 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq) | |||
2100 | * we allocate pages instead doing a kmalloc like rpc_malloc is because we want | 2105 | * we allocate pages instead doing a kmalloc like rpc_malloc is because we want |
2101 | * to use the server side send routines. | 2106 | * to use the server side send routines. |
2102 | */ | 2107 | */ |
2103 | void *bc_malloc(struct rpc_task *task, size_t size) | 2108 | static void *bc_malloc(struct rpc_task *task, size_t size) |
2104 | { | 2109 | { |
2105 | struct page *page; | 2110 | struct page *page; |
2106 | struct rpc_buffer *buf; | 2111 | struct rpc_buffer *buf; |
@@ -2120,7 +2125,7 @@ void *bc_malloc(struct rpc_task *task, size_t size) | |||
2120 | /* | 2125 | /* |
2121 | * Free the space allocated in the bc_alloc routine | 2126 | * Free the space allocated in the bc_alloc routine |
2122 | */ | 2127 | */ |
2123 | void bc_free(void *buffer) | 2128 | static void bc_free(void *buffer) |
2124 | { | 2129 | { |
2125 | struct rpc_buffer *buf; | 2130 | struct rpc_buffer *buf; |
2126 | 2131 | ||