diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-01-28 08:20:26 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-01-28 06:11:45 -0800 |
commit | 921332253e86cf15ad6bd1adb963523a3980e94d (patch) | |
tree | 596cf0555a687c1a1a4c01812b48628ffba6643f /xlators | |
parent | c15449aaaeb725c49af3817e07ea33c6c09c8c15 (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')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 4 |
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 3997791d69a..f8a60b52038 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)) |