All of lore.kernel.org
 help / color / mirror / Atom feed
* + btrfs-only-bug_on-when-the-errno-is-not-enoent.patch added to -mm tree
@ 2010-09-10 23:06 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2010-09-10 23:06 UTC (permalink / raw)
  To: mm-commits; +Cc: kitayama, andi, chris.mason, vivian.zhang, zhu.yanhai


The patch titled
     btrfs: only BUG_ON when the errno is not ENOENT
has been added to the -mm tree.  Its filename is
     btrfs-only-bug_on-when-the-errno-is-not-enoent.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: btrfs: only BUG_ON when the errno is not ENOENT
From: Itaru Kitayama <kitayama@cl.bb4u.ne.jp>

As Andi Kleen's commit 018db35864fd8d307066485a2753866240c3dace makes
btrfs_del_dir_entries_in_log() able to return the real errno instead of a
zero, we should only BUG_ON it when it's non-zero and not -ENOENT.

Signed-off-by: Zhu Yanhai <zhu.yanhai@gmail.com>
Cc: <zhu.yanhai@gmail.com>
Cc: <vivian.zhang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/btrfs/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/btrfs/inode.c~btrfs-only-bug_on-when-the-errno-is-not-enoent fs/btrfs/inode.c
--- a/fs/btrfs/inode.c~btrfs-only-bug_on-when-the-errno-is-not-enoent
+++ a/fs/btrfs/inode.c
@@ -2639,7 +2639,7 @@ int btrfs_unlink_inode(struct btrfs_tran
 
 	ret = btrfs_del_dir_entries_in_log(trans, root, name, name_len,
 					   dir, index);
-	BUG_ON(ret);
+	BUG_ON(ret != 0 && ret != -ENOENT);
 err:
 	btrfs_free_path(path);
 	if (ret)
_

Patches currently in -mm which might be from kitayama@cl.bb4u.ne.jp are

btrfs-only-bug_on-when-the-errno-is-not-enoent.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-10 23:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-10 23:06 + btrfs-only-bug_on-when-the-errno-is-not-enoent.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.