Commit 26f88363 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: remove xfs_vn_setattr_nonsize

Merge xfs_vn_setattr_nonsize into the only caller.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarGao Xiang <hsiangkao@redhat.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 3937493c
...@@ -824,22 +824,6 @@ xfs_setattr_nonsize( ...@@ -824,22 +824,6 @@ xfs_setattr_nonsize(
return error; return error;
} }
int
xfs_vn_setattr_nonsize(
struct dentry *dentry,
struct iattr *iattr)
{
struct xfs_inode *ip = XFS_I(d_inode(dentry));
int error;
trace_xfs_setattr(ip);
error = xfs_vn_change_ok(dentry, iattr);
if (error)
return error;
return xfs_setattr_nonsize(ip, iattr, 0);
}
/* /*
* Truncate file. Must have write permission and not be a directory. * Truncate file. Must have write permission and not be a directory.
* *
...@@ -1067,11 +1051,11 @@ xfs_vn_setattr( ...@@ -1067,11 +1051,11 @@ xfs_vn_setattr(
struct dentry *dentry, struct dentry *dentry,
struct iattr *iattr) struct iattr *iattr)
{ {
struct inode *inode = d_inode(dentry);
struct xfs_inode *ip = XFS_I(inode);
int error; int error;
if (iattr->ia_valid & ATTR_SIZE) { if (iattr->ia_valid & ATTR_SIZE) {
struct inode *inode = d_inode(dentry);
struct xfs_inode *ip = XFS_I(inode);
uint iolock; uint iolock;
xfs_ilock(ip, XFS_MMAPLOCK_EXCL); xfs_ilock(ip, XFS_MMAPLOCK_EXCL);
...@@ -1086,7 +1070,11 @@ xfs_vn_setattr( ...@@ -1086,7 +1070,11 @@ xfs_vn_setattr(
error = xfs_vn_setattr_size(dentry, iattr); error = xfs_vn_setattr_size(dentry, iattr);
xfs_iunlock(ip, XFS_MMAPLOCK_EXCL); xfs_iunlock(ip, XFS_MMAPLOCK_EXCL);
} else { } else {
error = xfs_vn_setattr_nonsize(dentry, iattr); trace_xfs_setattr(ip);
error = xfs_vn_change_ok(dentry, iattr);
if (!error)
error = xfs_setattr_nonsize(ip, iattr, 0);
} }
return error; return error;
......
...@@ -21,7 +21,6 @@ extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size); ...@@ -21,7 +21,6 @@ extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size);
extern void xfs_setattr_time(struct xfs_inode *ip, struct iattr *iattr); extern void xfs_setattr_time(struct xfs_inode *ip, struct iattr *iattr);
extern int xfs_setattr_nonsize(struct xfs_inode *ip, struct iattr *vap, extern int xfs_setattr_nonsize(struct xfs_inode *ip, struct iattr *vap,
int flags); int flags);
extern int xfs_vn_setattr_nonsize(struct dentry *dentry, struct iattr *vap);
extern int xfs_vn_setattr_size(struct dentry *dentry, struct iattr *vap); extern int xfs_vn_setattr_size(struct dentry *dentry, struct iattr *vap);
#endif /* __XFS_IOPS_H__ */ #endif /* __XFS_IOPS_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment