diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-10-27 08:47:28 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-28 01:46:35 -0700 |
commit | 6bfbcf7326a1261c8ff7cde9fd2c76a55cf756ae (patch) | |
tree | edde39d4962bce35394f682adfeeb8505f7b37f3 /xlators/mount | |
parent | b4dd7534007dccbc90d7341259bd92a0ff6a678c (diff) |
mount/fuse: Derive fd from the file handle for setattr
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 146 (Add setattr FOP)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 4 |
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 7ff39ec3f..18e51a7fa 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); |