diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2016-12-01 02:13:05 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-02-23 06:53:52 +0300 |
commit | 1c608c2d1aefca2bf63497663e17cfb49e6b022c (patch) | |
tree | e14850fa49be1d6b71a51aea6b26dc26f90c96d7 /fs/fuse | |
parent | 34a0362f84457031a9252c7ffc30263c9cc00bf9 (diff) | |
download | linux-1c608c2d1aefca2bf63497663e17cfb49e6b022c.tar.xz |
Revert "fs: Give dentry to inode_change_ok() instead of inode"
This reverts commit be9df699432235753c3824b0f5a27d46de7fdc9e, which was
commit 31051c85b5e2aaaf6315f74c72a732673632a905 upstream. The backport
breaks fuse and makes a mess of xfs, which can be improved by picking
further upstream commits as I should have done in the first place.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dir.c | 9 | ||||
-rw-r--r-- | fs/fuse/fuse_i.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 31ad5fc879b8..0c6048247a34 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1704,10 +1704,9 @@ int fuse_flush_times(struct inode *inode, struct fuse_file *ff) * vmtruncate() doesn't allow for this case, so do the rlimit checking * and the actual truncation by hand. */ -int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, +int fuse_do_setattr(struct inode *inode, struct iattr *attr, struct file *file) { - struct inode *inode = dentry->d_inode; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); struct fuse_req *req; @@ -1722,7 +1721,7 @@ int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS)) attr->ia_valid |= ATTR_FORCE; - err = setattr_prepare(dentry, attr); + err = inode_change_ok(inode, attr); if (err) return err; @@ -1827,9 +1826,9 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) return -EACCES; if (attr->ia_valid & ATTR_FILE) - return fuse_do_setattr(entry, attr, attr->ia_file); + return fuse_do_setattr(inode, attr, attr->ia_file); else - return fuse_do_setattr(entry, attr, NULL); + return fuse_do_setattr(inode, attr, NULL); } static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry, diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 300619ba8591..e8e47a6ab518 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -894,7 +894,7 @@ bool fuse_write_update_size(struct inode *inode, loff_t pos); int fuse_flush_times(struct inode *inode, struct fuse_file *ff); int fuse_write_inode(struct inode *inode, struct writeback_control *wbc); -int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, +int fuse_do_setattr(struct inode *inode, struct iattr *attr, struct file *file); #endif /* _FS_FUSE_I_H */ |