diff options
-rw-r--r-- | fs/jfs/acl.c | 24 | ||||
-rw-r--r-- | fs/jfs/resize.c | 4 | ||||
-rw-r--r-- | fs/jfs/super.c | 4 |
3 files changed, 20 insertions, 12 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 7bc186f4ed4d..2e71b6e7e646 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -77,13 +77,6 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type, | |||
77 | switch (type) { | 77 | switch (type) { |
78 | case ACL_TYPE_ACCESS: | 78 | case ACL_TYPE_ACCESS: |
79 | ea_name = XATTR_NAME_POSIX_ACL_ACCESS; | 79 | ea_name = XATTR_NAME_POSIX_ACL_ACCESS; |
80 | if (acl) { | ||
81 | rc = posix_acl_update_mode(inode, &inode->i_mode, &acl); | ||
82 | if (rc) | ||
83 | return rc; | ||
84 | inode->i_ctime = current_time(inode); | ||
85 | mark_inode_dirty(inode); | ||
86 | } | ||
87 | break; | 80 | break; |
88 | case ACL_TYPE_DEFAULT: | 81 | case ACL_TYPE_DEFAULT: |
89 | ea_name = XATTR_NAME_POSIX_ACL_DEFAULT; | 82 | ea_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
@@ -115,12 +108,27 @@ int jfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
115 | { | 108 | { |
116 | int rc; | 109 | int rc; |
117 | tid_t tid; | 110 | tid_t tid; |
111 | int update_mode = 0; | ||
112 | umode_t mode = inode->i_mode; | ||
118 | 113 | ||
119 | tid = txBegin(inode->i_sb, 0); | 114 | tid = txBegin(inode->i_sb, 0); |
120 | mutex_lock(&JFS_IP(inode)->commit_mutex); | 115 | mutex_lock(&JFS_IP(inode)->commit_mutex); |
116 | if (type == ACL_TYPE_ACCESS && acl) { | ||
117 | rc = posix_acl_update_mode(inode, &mode, &acl); | ||
118 | if (rc) | ||
119 | goto end_tx; | ||
120 | update_mode = 1; | ||
121 | } | ||
121 | rc = __jfs_set_acl(tid, inode, type, acl); | 122 | rc = __jfs_set_acl(tid, inode, type, acl); |
122 | if (!rc) | 123 | if (!rc) { |
124 | if (update_mode) { | ||
125 | inode->i_mode = mode; | ||
126 | inode->i_ctime = current_time(inode); | ||
127 | mark_inode_dirty(inode); | ||
128 | } | ||
123 | rc = txCommit(tid, 1, &inode, 0); | 129 | rc = txCommit(tid, 1, &inode, 0); |
130 | } | ||
131 | end_tx: | ||
124 | txEnd(tid); | 132 | txEnd(tid); |
125 | mutex_unlock(&JFS_IP(inode)->commit_mutex); | 133 | mutex_unlock(&JFS_IP(inode)->commit_mutex); |
126 | return rc; | 134 | return rc; |
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index bd9b641ada2c..7ddcb445a3d9 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c | |||
@@ -98,7 +98,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) | |||
98 | goto out; | 98 | goto out; |
99 | } | 99 | } |
100 | 100 | ||
101 | VolumeSize = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits; | 101 | VolumeSize = i_size_read(sb->s_bdev->bd_inode) >> sb->s_blocksize_bits; |
102 | 102 | ||
103 | if (VolumeSize) { | 103 | if (VolumeSize) { |
104 | if (newLVSize > VolumeSize) { | 104 | if (newLVSize > VolumeSize) { |
@@ -211,7 +211,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) | |||
211 | txQuiesce(sb); | 211 | txQuiesce(sb); |
212 | 212 | ||
213 | /* Reset size of direct inode */ | 213 | /* Reset size of direct inode */ |
214 | sbi->direct_inode->i_size = sb->s_bdev->bd_inode->i_size; | 214 | sbi->direct_inode->i_size = i_size_read(sb->s_bdev->bd_inode); |
215 | 215 | ||
216 | if (sbi->mntflag & JFS_INLINELOG) { | 216 | if (sbi->mntflag & JFS_INLINELOG) { |
217 | /* | 217 | /* |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index e8aad7d87b8c..78b41e1d5c67 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -313,7 +313,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, | |||
313 | } | 313 | } |
314 | case Opt_resize_nosize: | 314 | case Opt_resize_nosize: |
315 | { | 315 | { |
316 | *newLVSize = sb->s_bdev->bd_inode->i_size >> | 316 | *newLVSize = i_size_read(sb->s_bdev->bd_inode) >> |
317 | sb->s_blocksize_bits; | 317 | sb->s_blocksize_bits; |
318 | if (*newLVSize == 0) | 318 | if (*newLVSize == 0) |
319 | pr_err("JFS: Cannot determine volume size\n"); | 319 | pr_err("JFS: Cannot determine volume size\n"); |
@@ -579,7 +579,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
579 | goto out_unload; | 579 | goto out_unload; |
580 | } | 580 | } |
581 | inode->i_ino = 0; | 581 | inode->i_ino = 0; |
582 | inode->i_size = sb->s_bdev->bd_inode->i_size; | 582 | inode->i_size = i_size_read(sb->s_bdev->bd_inode); |
583 | inode->i_mapping->a_ops = &jfs_metapage_aops; | 583 | inode->i_mapping->a_ops = &jfs_metapage_aops; |
584 | hlist_add_fake(&inode->i_hash); | 584 | hlist_add_fake(&inode->i_hash); |
585 | mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); | 585 | mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); |