aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/acl.c')
-rw-r--r--fs/jfs/acl.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
index d66477c34306..213169780b6c 100644
--- a/fs/jfs/acl.c
+++ b/fs/jfs/acl.c
@@ -20,7 +20,6 @@
20 20
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/quotaops.h>
24#include <linux/posix_acl_xattr.h> 23#include <linux/posix_acl_xattr.h>
25#include "jfs_incore.h" 24#include "jfs_incore.h"
26#include "jfs_txnmgr.h" 25#include "jfs_txnmgr.h"
@@ -174,7 +173,7 @@ cleanup:
174 return rc; 173 return rc;
175} 174}
176 175
177static int jfs_acl_chmod(struct inode *inode) 176int jfs_acl_chmod(struct inode *inode)
178{ 177{
179 struct posix_acl *acl, *clone; 178 struct posix_acl *acl, *clone;
180 int rc; 179 int rc;
@@ -205,26 +204,3 @@ static int jfs_acl_chmod(struct inode *inode)
205 posix_acl_release(clone); 204 posix_acl_release(clone);
206 return rc; 205 return rc;
207} 206}
208
209int jfs_setattr(struct dentry *dentry, struct iattr *iattr)
210{
211 struct inode *inode = dentry->d_inode;
212 int rc;
213
214 rc = inode_change_ok(inode, iattr);
215 if (rc)
216 return rc;
217
218 if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) ||
219 (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) {
220 if (vfs_dq_transfer(inode, iattr))
221 return -EDQUOT;
222 }
223
224 rc = inode_setattr(inode, iattr);
225
226 if (!rc && (iattr->ia_valid & ATTR_MODE))
227 rc = jfs_acl_chmod(inode);
228
229 return rc;
230}