From f44306757c62b3bf4eedb7df8ceb4a1066af761b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 8 Sep 2016 14:38:45 -0700 Subject: [PATCH] scoutfs: add btree deletion trace message Add a simple trace message with the result of item deletion calls. Signed-off-by: Zach Brown --- kmod/src/btree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kmod/src/btree.c b/kmod/src/btree.c index babe6b57..618e88e7 100644 --- a/kmod/src/btree.c +++ b/kmod/src/btree.c @@ -963,8 +963,10 @@ int scoutfs_btree_delete(struct super_block *sb, struct scoutfs_key *key) int ret; bh = btree_walk(sb, key, NULL, 0, 0, WALK_DELETE); - if (IS_ERR(bh)) - return PTR_ERR(bh); + if (IS_ERR(bh)) { + ret = PTR_ERR(bh); + goto out; + } bt = bh_data(bh); pos = find_pos(bt, key, &cmp); @@ -991,6 +993,8 @@ int scoutfs_btree_delete(struct super_block *sb, struct scoutfs_key *key) unlock_block(NULL, bh, true); scoutfs_block_put(bh); +out: + trace_printk("key "CKF" ret %d\n", CKA(key), ret); return ret; }