From 830f6ebe7462aef6b190c63d7c49288501283ab3 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Wed, 23 Dec 2015 23:37:54 +0530 Subject: tier/unlink: symlink failed to unlink during unlink of a file, we will get stat just after deleting the file, to see if the file is under migration or not but this stat call will fail for symlink if the actual file was deleted. So it is better not to send stat request from client if it is a symlink as we are not migrating symlink back port of> >Change-Id: Idc033b24fa3522b5261e579889d2195b43419682 >BUG: 1293963 >Signed-off-by: Mohammed Rafi KC >Reviewed-on: http://review.gluster.org/13074 >Tested-by: Gluster Build System >Tested-by: NetBSD Build System >Reviewed-by: Pranith Kumar Karampuri >Reviewed-by: Dan Lambright >Tested-by: Dan Lambright Change-Id: Ic53a9ad29722927f44004d2e7289c807c7485df0 BUG: 1295347 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/13159 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Dan Lambright --- xlators/storage/posix/src/posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/storage/posix/src/posix.c') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 473d73994e0..27885b8f8c5 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1759,7 +1759,8 @@ posix_unlink (call_frame_t *frame, xlator_t *this, goto out; } - if (xdata && dict_get (xdata, DHT_IATT_IN_XDATA_KEY)) { + if (IA_ISREG (loc->inode->ia_type) && + xdata && dict_get (xdata, DHT_IATT_IN_XDATA_KEY)) { fdstat_requested = 1; } -- cgit