diff options
Diffstat (limited to 'fs/jffs2/fs.c')
-rw-r--r-- | fs/jffs2/fs.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 24cb4c688efc..a0f84673ce54 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -184,7 +184,12 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) | |||
184 | 184 | ||
185 | int jffs2_setattr(struct dentry *dentry, struct iattr *iattr) | 185 | int jffs2_setattr(struct dentry *dentry, struct iattr *iattr) |
186 | { | 186 | { |
187 | return jffs2_do_setattr(dentry->d_inode, iattr); | 187 | int rc; |
188 | |||
189 | rc = jffs2_do_setattr(dentry->d_inode, iattr); | ||
190 | if (!rc && (iattr->ia_valid & ATTR_MODE)) | ||
191 | rc = jffs2_acl_chmod(dentry->d_inode); | ||
192 | return rc; | ||
188 | } | 193 | } |
189 | 194 | ||
190 | int jffs2_statfs(struct super_block *sb, struct kstatfs *buf) | 195 | int jffs2_statfs(struct super_block *sb, struct kstatfs *buf) |
@@ -223,6 +228,7 @@ void jffs2_clear_inode (struct inode *inode) | |||
223 | 228 | ||
224 | D1(printk(KERN_DEBUG "jffs2_clear_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode)); | 229 | D1(printk(KERN_DEBUG "jffs2_clear_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode)); |
225 | 230 | ||
231 | jffs2_xattr_delete_inode(c, f->inocache); | ||
226 | jffs2_do_clear_inode(c, f); | 232 | jffs2_do_clear_inode(c, f); |
227 | } | 233 | } |
228 | 234 | ||
@@ -508,6 +514,8 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) | |||
508 | } | 514 | } |
509 | memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *)); | 515 | memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *)); |
510 | 516 | ||
517 | jffs2_init_xattr_subsystem(c); | ||
518 | |||
511 | if ((ret = jffs2_do_mount_fs(c))) | 519 | if ((ret = jffs2_do_mount_fs(c))) |
512 | goto out_inohash; | 520 | goto out_inohash; |
513 | 521 | ||
@@ -542,6 +550,7 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) | |||
542 | else | 550 | else |
543 | kfree(c->blocks); | 551 | kfree(c->blocks); |
544 | out_inohash: | 552 | out_inohash: |
553 | jffs2_clear_xattr_subsystem(c); | ||
545 | kfree(c->inocache_list); | 554 | kfree(c->inocache_list); |
546 | out_wbuf: | 555 | out_wbuf: |
547 | jffs2_flash_cleanup(c); | 556 | jffs2_flash_cleanup(c); |