summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/stub/bit-rot-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/bit-rot/src/stub/bit-rot-stub.c')
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index b93f62f..67103f6 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -2854,13 +2854,15 @@ br_stub_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
br_stub_inode_ctx_t *ctx = NULL;
int32_t ret = -1;
- if (op_ret < 0)
- goto unwind;
-
local = frame->local;
frame->local = NULL;
+ if (op_ret < 0)
+ goto unwind;
+
inode = local->u.context.inode;
+ if (!IA_ISREG (inode->ia_type))
+ goto unwind;
ret = br_stub_get_inode_ctx (this, inode, &ctx_addr);
if (ret) {