From 598ab12c30b44c4c5f5922f3b76eec2ed8872790 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 14 Mar 2012 16:13:17 +0530 Subject: mount/fuse-bridge: don't pass flags O_CREAT | O_EXCL during open as part of fd-migration during graph-switch Change-Id: Ia1494941d3e3d5bebdba3483b0ea7b32c9704b8c BUG: 802710 Signed-off-by: Raghavendra G Reviewed-on: http://review.gluster.com/2943 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/mount/fuse/src/fuse-bridge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mount/fuse/src/fuse-bridge.c') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 96b3e5f55d1..77b89f1858a 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3516,6 +3516,7 @@ fuse_migrate_fd (xlator_t *this, fd_t *fd, xlator_t *old_subvol, loc_t loc = {0, }; char create_in_progress = 0; inode_t *old_inode = NULL; + int flags = 0; /* could've used pthread_cond_wait, but that requires a cond variable to * be mainted for each fd and that is a bit too much overhead. @@ -3581,7 +3582,8 @@ fuse_migrate_fd (xlator_t *this, fd_t *fd, xlator_t *old_subvol, if (IA_ISDIR (fd->inode->ia_type)) { ret = syncop_opendir (new_subvol, &loc, fd); } else { - ret = syncop_open (new_subvol, &loc, fd->flags, fd); + flags = fd->flags & ~(O_CREAT | O_EXCL); + ret = syncop_open (new_subvol, &loc, flags, fd); } if (ret < 0) { -- cgit