summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-10-06 06:45:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-06 05:49:11 -0700
commitc1fd29003e68268cf81a72b83865f473a21d0d2f (patch)
tree45f1ef609453a11d7a03a5b20d60db8f416ab201 /xlators/storage/posix/src/posix.c
parentb4c87b3314f20188f6cd2998cdd7c9e9ca015850 (diff)
storage/posix: Process "glusterfs.content" key in lookup only for regular files.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 301 (lookup should ignore ISDIR error when trying to get content) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=301
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r--xlators/storage/posix/src/posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 8839c49..29a98df 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -105,7 +105,9 @@ _posix_xattr_get_set (dict_t *xattr_req,
/* should size be put into the data_t ? */
- if (!strcmp (key, "glusterfs.content")) {
+ if (!strcmp (key, "glusterfs.content")
+ && S_ISREG (filler->stbuf->st_mode)) {
+
/* file content request */
req_size = data_to_uint64 (data);
if (req_size >= filler->stbuf->st_size) {