aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-01-26 03:56:59 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-26 16:50:59 -0500
commite2df0c8644db3d01e3c6fc5f7670fdd7b4c2b234 (patch)
tree832718f7a8e8b06dbf5cdaac4aa4d9e7c3b57cd8
parent250f3915183d377d36e012bac9caa7345ce465b8 (diff)
[PATCH] knfsd: replace some warning ins nfsfh.h with BUG_ON or WARN_ON
A couple of the warnings will be followed by an Oops if they ever fire, so may as well be BUG_ON. Another isn't obviously fatal but has never been known to fire, so make it a WARN_ON. Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/nfsd/nfsfh.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index f3b51d62ec7d..d9c6c382165d 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -217,11 +217,7 @@ void fh_put(struct svc_fh *);
217static __inline__ struct svc_fh * 217static __inline__ struct svc_fh *
218fh_copy(struct svc_fh *dst, struct svc_fh *src) 218fh_copy(struct svc_fh *dst, struct svc_fh *src)
219{ 219{
220 if (src->fh_dentry || src->fh_locked) { 220 WARN_ON(src->fh_dentry || src->fh_locked);
221 struct dentry *dentry = src->fh_dentry;
222 printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n",
223 dentry->d_parent->d_name.name, dentry->d_name.name);
224 }
225 221
226 *dst = *src; 222 *dst = *src;
227 return dst; 223 return dst;
@@ -300,10 +296,8 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass)
300 dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", 296 dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n",
301 SVCFH_fmt(fhp), fhp->fh_locked); 297 SVCFH_fmt(fhp), fhp->fh_locked);
302 298
303 if (!fhp->fh_dentry) { 299 BUG_ON(!dentry);
304 printk(KERN_ERR "fh_lock: fh not verified!\n"); 300
305 return;
306 }
307 if (fhp->fh_locked) { 301 if (fhp->fh_locked) {
308 printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", 302 printk(KERN_WARNING "fh_lock: %s/%s already locked!\n",
309 dentry->d_parent->d_name.name, dentry->d_name.name); 303 dentry->d_parent->d_name.name, dentry->d_name.name);
@@ -328,8 +322,7 @@ fh_lock(struct svc_fh *fhp)
328static inline void 322static inline void
329fh_unlock(struct svc_fh *fhp) 323fh_unlock(struct svc_fh *fhp)
330{ 324{
331 if (!fhp->fh_dentry) 325 BUG_ON(!fhp->fh_dentry);
332 printk(KERN_ERR "fh_unlock: fh not verified!\n");
333 326
334 if (fhp->fh_locked) { 327 if (fhp->fh_locked) {
335 fill_post_wcc(fhp); 328 fill_post_wcc(fhp);