summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2013-08-13 19:47:01 +0530
committerVijay Bellur <vbellur@redhat.com>2013-09-10 01:20:58 -0700
commit873ac7b37b0b6c18a14969286ebcf89bb67dfee2 (patch)
treec25a4534103164b9fb037472981b8d5935f92a47
parent6f3f1a529663a705a98142b91f6b3a6e4c8fe983 (diff)
mount/fuse: save the basefd flags in the new fd
Upon graph switch, the basefd's flags were not saved in the new fd created for the new graph upon which all the further requests for the open file would come. Thus posix was treating the fd as a read-only fd and was denying the write on the fds. Change-Id: I781b62b376a85d1a938c091559270c3f242f1a2a BUG: 998352 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5880 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 00f2a625ae1..2d4a75143a4 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -3942,6 +3942,7 @@ fuse_migrate_fd_open (xlator_t *this, fd_t *basefd, fd_t *oldfd,
goto out;
}
+ newfd->flags = basefd->flags;
if (newfd->lk_ctx)
fd_lk_ctx_unref (newfd->lk_ctx);