diff options
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 0572bca49f15..88b09a33d117 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -1602,9 +1602,10 @@ int fuse_flush_times(struct inode *inode, struct fuse_file *ff) | |||
1602 | * vmtruncate() doesn't allow for this case, so do the rlimit checking | 1602 | * vmtruncate() doesn't allow for this case, so do the rlimit checking |
1603 | * and the actual truncation by hand. | 1603 | * and the actual truncation by hand. |
1604 | */ | 1604 | */ |
1605 | int fuse_do_setattr(struct inode *inode, struct iattr *attr, | 1605 | int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, |
1606 | struct file *file) | 1606 | struct file *file) |
1607 | { | 1607 | { |
1608 | struct inode *inode = d_inode(dentry); | ||
1608 | struct fuse_conn *fc = get_fuse_conn(inode); | 1609 | struct fuse_conn *fc = get_fuse_conn(inode); |
1609 | struct fuse_inode *fi = get_fuse_inode(inode); | 1610 | struct fuse_inode *fi = get_fuse_inode(inode); |
1610 | FUSE_ARGS(args); | 1611 | FUSE_ARGS(args); |
@@ -1619,7 +1620,7 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr, | |||
1619 | if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS)) | 1620 | if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS)) |
1620 | attr->ia_valid |= ATTR_FORCE; | 1621 | attr->ia_valid |= ATTR_FORCE; |
1621 | 1622 | ||
1622 | err = inode_change_ok(inode, attr); | 1623 | err = setattr_prepare(dentry, attr); |
1623 | if (err) | 1624 | if (err) |
1624 | return err; | 1625 | return err; |
1625 | 1626 | ||
@@ -1718,9 +1719,9 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) | |||
1718 | return -EACCES; | 1719 | return -EACCES; |
1719 | 1720 | ||
1720 | if (attr->ia_valid & ATTR_FILE) | 1721 | if (attr->ia_valid & ATTR_FILE) |
1721 | return fuse_do_setattr(inode, attr, attr->ia_file); | 1722 | return fuse_do_setattr(entry, attr, attr->ia_file); |
1722 | else | 1723 | else |
1723 | return fuse_do_setattr(inode, attr, NULL); | 1724 | return fuse_do_setattr(entry, attr, NULL); |
1724 | } | 1725 | } |
1725 | 1726 | ||
1726 | static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry, | 1727 | static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry, |