aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/inotify
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/inotify')
-rw-r--r--fs/notify/inotify/inotify_user.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index ce21ebaee89e..f2b542479e91 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -449,20 +449,18 @@ static void inotify_remove_from_idr(struct fsnotify_group *group,
449 * if it wasn't.... 449 * if it wasn't....
450 */ 450 */
451 if (wd == -1) { 451 if (wd == -1) {
452 printk(KERN_WARNING "%s: ientry=%p ientry->wd=%d ientry->group=%p" 452 WARN_ONCE(1, "%s: ientry=%p ientry->wd=%d ientry->group=%p"
453 " ientry->inode=%p\n", __func__, ientry, ientry->wd, 453 " ientry->inode=%p\n", __func__, ientry, ientry->wd,
454 ientry->fsn_entry.group, ientry->fsn_entry.inode); 454 ientry->fsn_entry.group, ientry->fsn_entry.inode);
455 WARN_ON(1);
456 goto out; 455 goto out;
457 } 456 }
458 457
459 /* Lets look in the idr to see if we find it */ 458 /* Lets look in the idr to see if we find it */
460 found_ientry = inotify_idr_find_locked(group, wd); 459 found_ientry = inotify_idr_find_locked(group, wd);
461 if (unlikely(!found_ientry)) { 460 if (unlikely(!found_ientry)) {
462 printk(KERN_WARNING "%s: ientry=%p ientry->wd=%d ientry->group=%p" 461 WARN_ONCE(1, "%s: ientry=%p ientry->wd=%d ientry->group=%p"
463 " ientry->inode=%p\n", __func__, ientry, ientry->wd, 462 " ientry->inode=%p\n", __func__, ientry, ientry->wd,
464 ientry->fsn_entry.group, ientry->fsn_entry.inode); 463 ientry->fsn_entry.group, ientry->fsn_entry.inode);
465 WARN_ON(1);
466 goto out; 464 goto out;
467 } 465 }
468 466
@@ -472,8 +470,7 @@ static void inotify_remove_from_idr(struct fsnotify_group *group,
472 * fucked up somewhere. 470 * fucked up somewhere.
473 */ 471 */
474 if (unlikely(found_ientry != ientry)) { 472 if (unlikely(found_ientry != ientry)) {
475 WARN_ON(1); 473 WARN_ONCE(1, "%s: ientry=%p ientry->wd=%d ientry->group=%p "
476 printk(KERN_WARNING "%s: ientry=%p ientry->wd=%d ientry->group=%p "
477 "entry->inode=%p found_ientry=%p found_ientry->wd=%d " 474 "entry->inode=%p found_ientry=%p found_ientry->wd=%d "
478 "found_ientry->group=%p found_ientry->inode=%p\n", 475 "found_ientry->group=%p found_ientry->inode=%p\n",
479 __func__, ientry, ientry->wd, ientry->fsn_entry.group, 476 __func__, ientry, ientry->wd, ientry->fsn_entry.group,
@@ -489,7 +486,7 @@ static void inotify_remove_from_idr(struct fsnotify_group *group,
489 * one ref grabbed by inotify_idr_find 486 * one ref grabbed by inotify_idr_find
490 */ 487 */
491 if (unlikely(atomic_read(&ientry->fsn_entry.refcnt) < 3)) { 488 if (unlikely(atomic_read(&ientry->fsn_entry.refcnt) < 3)) {
492 printk(KERN_WARNING "%s: ientry=%p ientry->wd=%d ientry->group=%p" 489 printk(KERN_ERR "%s: ientry=%p ientry->wd=%d ientry->group=%p"
493 " ientry->inode=%p\n", __func__, ientry, ientry->wd, 490 " ientry->inode=%p\n", __func__, ientry, ientry->wd,
494 ientry->fsn_entry.group, ientry->fsn_entry.inode); 491 ientry->fsn_entry.group, ientry->fsn_entry.inode);
495 /* we can't really recover with bad ref cnting.. */ 492 /* we can't really recover with bad ref cnting.. */