summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-01-28 08:24:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-29 00:46:03 -0800
commit4462b4a31e7ac3a4394f46d7d3067cc03fd24dee (patch)
tree6af918ade4579ffd035197f71581550e7bc1a91f /xlators/cluster
parent15b3f715ac6c7dc127723908f269f0418b61de71 (diff)
cluster/dht: Check for size 0 in check_is_linkfile()
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 574 (Sticky bit files are not listed in the output of ls on a dht volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=574
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 3997791d6..f8a60b520 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -161,7 +161,9 @@ typedef struct dht_disk_layout dht_disk_layout_t;
#define is_last_call(cnt) (cnt == 0)
#define DHT_LINKFILE_MODE (S_ISVTX)
-#define check_is_linkfile(i,s,x) ((s->st_mode & ~S_IFMT) == DHT_LINKFILE_MODE)
+#define check_is_linkfile(i,s,x) ( \
+ ((s->st_mode & ~S_IFMT) == DHT_LINKFILE_MODE) && \
+ (s->st_size == 0))
#define check_is_dir(i,s,x) (S_ISDIR(s->st_mode))