summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2018-05-21 14:51:44 -0400
committerShyamsundar Ranganathan <srangana@redhat.com>2018-05-25 02:06:06 +0000
commitd8b7ec6b4176981cf8b4fe4fae4da2ca5fca4bdf (patch)
tree0d7aa6ee7e1cac1c1d0eb74ffb75a3c543381489
parentb679fd4b73d9ec039029088769722887b61d750a (diff)
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#1582199 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> (cherry picked from commit de9b8c06b89b6129154693f048985554ccc5a7e7)
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index bf7e87dc91b..8727b9045b4 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -5148,7 +5148,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);
@@ -5188,8 +5193,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;