From de9b8c06b89b6129154693f048985554ccc5a7e7 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Mon, 21 May 2018 14:51:44 -0400 Subject: storage/posix: use proper FOP for unwinding readdir(p) As of now, even for readdirp, posix is unwinding with readdir signature. Change-Id: I6440c8a253c5d78bbcc97043e4e6e208e3d47cd1 fixes: bz#1581345 Signed-off-by: Raghavendra Bhat --- xlators/storage/posix/src/posix-inode-fd-ops.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'xlators/storage/posix/src/posix-inode-fd-ops.c') diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 011dc193d90..4a7385cd271 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -5166,7 +5166,12 @@ posix_do_readdir (call_frame_t *frame, xlator_t *this, posix_readdirp_fill (this, fd, &entries, dict); out: - STACK_UNWIND_STRICT (readdir, frame, op_ret, op_errno, &entries, NULL); + if (whichop == GF_FOP_READDIR) + STACK_UNWIND_STRICT (readdir, frame, op_ret, op_errno, &entries, + NULL); + else + STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, + &entries, NULL); gf_dirent_free (&entries); @@ -5206,8 +5211,8 @@ posix_readdirp (call_frame_t *frame, xlator_t *this, } } - STACK_UNWIND_STRICT (readdir, frame, op_ret, op_errno, &entries, - NULL); + STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, + &entries, NULL); gf_dirent_free (&entries); return 0; -- cgit