diff options
-rw-r--r-- | fs/lockd/svc.c | 2 | ||||
-rw-r--r-- | fs/nfs/callback.c | 3 | ||||
-rw-r--r-- | fs/nfs/callback_xdr.c | 6 | ||||
-rw-r--r-- | fs/nfs/delegation.c | 2 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfsfh.c | 2 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 6 |
8 files changed, 13 insertions, 12 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 08226464e563..1ed8bd4de941 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -153,7 +153,7 @@ lockd(struct svc_rqst *rqstp) | |||
153 | */ | 153 | */ |
154 | while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) { | 154 | while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) { |
155 | long timeout = MAX_SCHEDULE_TIMEOUT; | 155 | long timeout = MAX_SCHEDULE_TIMEOUT; |
156 | char buf[RPC_MAX_ADDRBUFLEN]; | 156 | RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); |
157 | 157 | ||
158 | if (signalled()) { | 158 | if (signalled()) { |
159 | flush_signals(current); | 159 | flush_signals(current); |
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index ecc06c619494..66648dd92d97 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -93,6 +93,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp) | |||
93 | svc_process(rqstp); | 93 | svc_process(rqstp); |
94 | } | 94 | } |
95 | 95 | ||
96 | flush_signals(current); | ||
96 | svc_exit_thread(rqstp); | 97 | svc_exit_thread(rqstp); |
97 | nfs_callback_info.pid = 0; | 98 | nfs_callback_info.pid = 0; |
98 | complete(&nfs_callback_info.stopped); | 99 | complete(&nfs_callback_info.stopped); |
@@ -171,7 +172,7 @@ void nfs_callback_down(void) | |||
171 | static int nfs_callback_authenticate(struct svc_rqst *rqstp) | 172 | static int nfs_callback_authenticate(struct svc_rqst *rqstp) |
172 | { | 173 | { |
173 | struct nfs_client *clp; | 174 | struct nfs_client *clp; |
174 | char buf[RPC_MAX_ADDRBUFLEN]; | 175 | RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); |
175 | 176 | ||
176 | /* Don't talk to strangers */ | 177 | /* Don't talk to strangers */ |
177 | clp = nfs_find_client(svc_addr(rqstp), 4); | 178 | clp = nfs_find_client(svc_addr(rqstp), 4); |
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index c63eb720b68b..13619d24f023 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
@@ -254,7 +254,7 @@ static __be32 encode_attr_change(struct xdr_stream *xdr, const uint32_t *bitmap, | |||
254 | if (!(bitmap[0] & FATTR4_WORD0_CHANGE)) | 254 | if (!(bitmap[0] & FATTR4_WORD0_CHANGE)) |
255 | return 0; | 255 | return 0; |
256 | p = xdr_reserve_space(xdr, 8); | 256 | p = xdr_reserve_space(xdr, 8); |
257 | if (unlikely(p == 0)) | 257 | if (unlikely(!p)) |
258 | return htonl(NFS4ERR_RESOURCE); | 258 | return htonl(NFS4ERR_RESOURCE); |
259 | p = xdr_encode_hyper(p, change); | 259 | p = xdr_encode_hyper(p, change); |
260 | return 0; | 260 | return 0; |
@@ -267,7 +267,7 @@ static __be32 encode_attr_size(struct xdr_stream *xdr, const uint32_t *bitmap, u | |||
267 | if (!(bitmap[0] & FATTR4_WORD0_SIZE)) | 267 | if (!(bitmap[0] & FATTR4_WORD0_SIZE)) |
268 | return 0; | 268 | return 0; |
269 | p = xdr_reserve_space(xdr, 8); | 269 | p = xdr_reserve_space(xdr, 8); |
270 | if (unlikely(p == 0)) | 270 | if (unlikely(!p)) |
271 | return htonl(NFS4ERR_RESOURCE); | 271 | return htonl(NFS4ERR_RESOURCE); |
272 | p = xdr_encode_hyper(p, size); | 272 | p = xdr_encode_hyper(p, size); |
273 | return 0; | 273 | return 0; |
@@ -278,7 +278,7 @@ static __be32 encode_attr_time(struct xdr_stream *xdr, const struct timespec *ti | |||
278 | __be32 *p; | 278 | __be32 *p; |
279 | 279 | ||
280 | p = xdr_reserve_space(xdr, 12); | 280 | p = xdr_reserve_space(xdr, 12); |
281 | if (unlikely(p == 0)) | 281 | if (unlikely(!p)) |
282 | return htonl(NFS4ERR_RESOURCE); | 282 | return htonl(NFS4ERR_RESOURCE); |
283 | p = xdr_encode_hyper(p, time->tv_sec); | 283 | p = xdr_encode_hyper(p, time->tv_sec); |
284 | *p = htonl(time->tv_nsec); | 284 | *p = htonl(time->tv_nsec); |
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index b9eadd18ba70..00a5e4405e16 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -49,7 +49,7 @@ static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_ | |||
49 | struct file_lock *fl; | 49 | struct file_lock *fl; |
50 | int status; | 50 | int status; |
51 | 51 | ||
52 | for (fl = inode->i_flock; fl != 0; fl = fl->fl_next) { | 52 | for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { |
53 | if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) | 53 | if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) |
54 | continue; | 54 | continue; |
55 | if (nfs_file_open_context(fl->fl_file) != ctx) | 55 | if (nfs_file_open_context(fl->fl_file) != ctx) |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 8ae5dba2d4e5..86147b0ab2cf 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -309,7 +309,7 @@ nfs_idmap_name(struct idmap *idmap, struct idmap_hashtable *h, | |||
309 | mutex_lock(&idmap->idmap_im_lock); | 309 | mutex_lock(&idmap->idmap_im_lock); |
310 | 310 | ||
311 | he = idmap_lookup_id(h, id); | 311 | he = idmap_lookup_id(h, id); |
312 | if (he != 0) { | 312 | if (he) { |
313 | memcpy(name, he->ih_name, he->ih_namelen); | 313 | memcpy(name, he->ih_name, he->ih_namelen); |
314 | ret = he->ih_namelen; | 314 | ret = he->ih_namelen; |
315 | goto out; | 315 | goto out; |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 6233eb5e98c1..b962397004c1 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -785,7 +785,7 @@ static int nfs4_reclaim_locks(struct nfs4_state_recovery_ops *ops, struct nfs4_s | |||
785 | struct file_lock *fl; | 785 | struct file_lock *fl; |
786 | int status = 0; | 786 | int status = 0; |
787 | 787 | ||
788 | for (fl = inode->i_flock; fl != 0; fl = fl->fl_next) { | 788 | for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { |
789 | if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) | 789 | if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) |
790 | continue; | 790 | continue; |
791 | if (nfs_file_open_context(fl->fl_file)->state != state) | 791 | if (nfs_file_open_context(fl->fl_file)->state != state) |
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 0130b345234d..1eb771d79cca 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -101,7 +101,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp, | |||
101 | { | 101 | { |
102 | /* Check if the request originated from a secure port. */ | 102 | /* Check if the request originated from a secure port. */ |
103 | if (!rqstp->rq_secure && EX_SECURE(exp)) { | 103 | if (!rqstp->rq_secure && EX_SECURE(exp)) { |
104 | char buf[RPC_MAX_ADDRBUFLEN]; | 104 | RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); |
105 | dprintk(KERN_WARNING | 105 | dprintk(KERN_WARNING |
106 | "nfsd: request from insecure port %s!\n", | 106 | "nfsd: request from insecure port %s!\n", |
107 | svc_print_addr(rqstp, buf, sizeof(buf))); | 107 | svc_print_addr(rqstp, buf, sizeof(buf))); |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 1d3e5fcc2cc4..c475977de05a 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -175,7 +175,7 @@ static int svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr) | |||
175 | size_t base = xdr->page_base; | 175 | size_t base = xdr->page_base; |
176 | unsigned int pglen = xdr->page_len; | 176 | unsigned int pglen = xdr->page_len; |
177 | unsigned int flags = MSG_MORE; | 177 | unsigned int flags = MSG_MORE; |
178 | char buf[RPC_MAX_ADDRBUFLEN]; | 178 | RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); |
179 | 179 | ||
180 | slen = xdr->len; | 180 | slen = xdr->len; |
181 | 181 | ||
@@ -716,7 +716,7 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt) | |||
716 | struct socket *newsock; | 716 | struct socket *newsock; |
717 | struct svc_sock *newsvsk; | 717 | struct svc_sock *newsvsk; |
718 | int err, slen; | 718 | int err, slen; |
719 | char buf[RPC_MAX_ADDRBUFLEN]; | 719 | RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); |
720 | 720 | ||
721 | dprintk("svc: tcp_accept %p sock %p\n", svsk, sock); | 721 | dprintk("svc: tcp_accept %p sock %p\n", svsk, sock); |
722 | if (!sock) | 722 | if (!sock) |
@@ -1206,10 +1206,10 @@ static struct svc_xprt *svc_create_socket(struct svc_serv *serv, | |||
1206 | struct socket *sock; | 1206 | struct socket *sock; |
1207 | int error; | 1207 | int error; |
1208 | int type; | 1208 | int type; |
1209 | char buf[RPC_MAX_ADDRBUFLEN]; | ||
1210 | struct sockaddr_storage addr; | 1209 | struct sockaddr_storage addr; |
1211 | struct sockaddr *newsin = (struct sockaddr *)&addr; | 1210 | struct sockaddr *newsin = (struct sockaddr *)&addr; |
1212 | int newlen; | 1211 | int newlen; |
1212 | RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); | ||
1213 | 1213 | ||
1214 | dprintk("svc: svc_create_socket(%s, %d, %s)\n", | 1214 | dprintk("svc: svc_create_socket(%s, %d, %s)\n", |
1215 | serv->sv_program->pg_name, protocol, | 1215 | serv->sv_program->pg_name, protocol, |