diff options
Diffstat (limited to 'fs/sysv/inode.c')
-rw-r--r-- | fs/sysv/inode.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 80e1e2b18df1..d33e506c1eac 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -202,8 +202,8 @@ struct inode *sysv_iget(struct super_block *sb, unsigned int ino) | |||
202 | } | 202 | } |
203 | /* SystemV FS: kludge permissions if ino==SYSV_ROOT_INO ?? */ | 203 | /* SystemV FS: kludge permissions if ino==SYSV_ROOT_INO ?? */ |
204 | inode->i_mode = fs16_to_cpu(sbi, raw_inode->i_mode); | 204 | inode->i_mode = fs16_to_cpu(sbi, raw_inode->i_mode); |
205 | inode->i_uid = (uid_t)fs16_to_cpu(sbi, raw_inode->i_uid); | 205 | i_uid_write(inode, (uid_t)fs16_to_cpu(sbi, raw_inode->i_uid)); |
206 | inode->i_gid = (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid); | 206 | i_gid_write(inode, (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid)); |
207 | set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink)); | 207 | set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink)); |
208 | inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size); | 208 | inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size); |
209 | inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime); | 209 | inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime); |
@@ -256,8 +256,8 @@ static int __sysv_write_inode(struct inode *inode, int wait) | |||
256 | } | 256 | } |
257 | 257 | ||
258 | raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); | 258 | raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); |
259 | raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid)); | 259 | raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(i_uid_read(inode))); |
260 | raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(inode->i_gid)); | 260 | raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(i_gid_read(inode))); |
261 | raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink); | 261 | raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink); |
262 | raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size); | 262 | raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size); |
263 | raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec); | 263 | raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec); |
@@ -360,5 +360,10 @@ int __init sysv_init_icache(void) | |||
360 | 360 | ||
361 | void sysv_destroy_icache(void) | 361 | void sysv_destroy_icache(void) |
362 | { | 362 | { |
363 | /* | ||
364 | * Make sure all delayed rcu free inodes are flushed before we | ||
365 | * destroy cache. | ||
366 | */ | ||
367 | rcu_barrier(); | ||
363 | kmem_cache_destroy(sysv_inode_cachep); | 368 | kmem_cache_destroy(sysv_inode_cachep); |
364 | } | 369 | } |