diff options
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 052327bd6c9d..6c83ed052026 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -1108,6 +1108,11 @@ static int fuse_do_setattr(struct dentry *entry, struct iattr *attr, | |||
1108 | inarg.valid |= FATTR_FH; | 1108 | inarg.valid |= FATTR_FH; |
1109 | inarg.fh = ff->fh; | 1109 | inarg.fh = ff->fh; |
1110 | } | 1110 | } |
1111 | if (attr->ia_valid & ATTR_SIZE) { | ||
1112 | /* For mandatory locking in truncate */ | ||
1113 | inarg.valid |= FATTR_LOCKOWNER; | ||
1114 | inarg.lock_owner = fuse_lock_owner_id(fc, current->files); | ||
1115 | } | ||
1111 | req->in.h.opcode = FUSE_SETATTR; | 1116 | req->in.h.opcode = FUSE_SETATTR; |
1112 | req->in.h.nodeid = get_node_id(inode); | 1117 | req->in.h.nodeid = get_node_id(inode); |
1113 | req->in.numargs = 1; | 1118 | req->in.numargs = 1; |