summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 7ff39ec3fa5..18e51a7faff 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -1057,7 +1057,9 @@ fuse_setattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
state->callcount = 2;
}
- state->fd = fd_lookup (state->loc.inode, finh->pid);
+ if (fsi->valid & FATTR_FH) {
+ state->fd = FH_TO_FD (fsi->fh);
+ }
if (fsi->valid & FATTR_SIZE) {
fuse_do_truncate (state, fsi);