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@xxxxxxxxxxxxx> 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@xxxxxxxxx> Cc: <zhu.yanhai@xxxxxxxxx> Cc: <vivian.zhang@xxxxxxxxx> Cc: Andi Kleen <andi@xxxxxxxxxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxx are btrfs-only-bug_on-when-the-errno-is-not-enoent.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html