summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-10-06 06:45:04 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-06 05:49:08 -0700
commit81cc40fee8b9cebcf5fc544c5d0c734fa7dfbb90 (patch)
tree58d50e314aff54440419425ca58e14b502d7bde2 /xlators/storage
parentf719a641841a2bbd6f59945e5e32350cfe89f814 (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')
-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 9e9c86349bb..ad71b678369 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -110,7 +110,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) {