* [PATCH] btrfs: Only BUG_ON when the errno is not ENOENT
@ 2010-09-09 15:26 Zhu Yanhai
0 siblings, 0 replies; only message in thread
From: Zhu Yanhai @ 2010-09-09 15:26 UTC (permalink / raw)
To: linux-btrfs; +Cc: vivian.zhang, Zhu Yanhai
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>
---
fs/btrfs/inode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c038644..4016b1d 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2651,7 +2651,7 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,
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)
--
1.7.2.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-09 15:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 15:26 [PATCH] btrfs: Only BUG_ON when the errno is not ENOENT Zhu Yanhai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).