From 6a465e6e7e46940e00a387089cc995464975b53d Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Tue, 7 Apr 2015 21:45:49 +0530 Subject: storage/posix: Introduce xattr_fill capability in posix_stat Change-Id: I2b6503ad9333f445ebdcd9fa660da20b861b985f BUG: 1207603 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/10158 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- xlators/storage/posix/src/posix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 9f20aeb6abc..cd93760faa4 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -223,6 +223,7 @@ posix_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata) int32_t op_errno = 0; struct posix_private *priv = NULL; char *real_path = NULL; + dict_t *xattr_rsp = NULL; DECLARE_OLD_FS_ID_VAR; @@ -246,12 +247,17 @@ posix_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata) strerror (op_errno)); goto out; } + if (xdata) + xattr_rsp = posix_lookup_xattr_fill (this, real_path, loc, + xdata, &buf); op_ret = 0; out: SET_TO_OLD_FS_ID(); - STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, &buf, NULL); + STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, &buf, xattr_rsp); + if (xattr_rsp) + dict_unref (xattr_rsp); return 0; } -- cgit