diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-21 20:19:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-21 20:19:48 -0500 |
commit | 1a4c6be4aca5ad6b300932efed1e2729fdc25af9 (patch) | |
tree | 99f43fadbc0dc6c43d275d4c7fafd3b52cccb217 /fs | |
parent | a62f735cbb1a0937ab6a9196dadf752694ef0b7f (diff) | |
parent | 5216a8e70e25b01cbd2915cd0442fb96deb2c262 (diff) |
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
Wrap buffers used for rpc debug printks into RPC_IFDEBUG
nfs: fix sparse warnings
NFS: flush signals before taking down callback thread
Diffstat (limited to 'fs')
-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 |
7 files changed, 10 insertions, 9 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))); |