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 <raghavendra@redhat.com>
This commit is contained in:
Raghavendra Bhat 2018-05-21 14:51:44 -04:00 committed by Amar Tumballi
parent ab18f27bff
commit de9b8c06b8

View File

@ -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;