diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 14:26:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 14:26:52 -0400 |
commit | 5f248c9c251c60af3403902b26e08de43964ea0b (patch) | |
tree | 6d3328e72a7e4015a64017eb30be18095c6a3c64 /fs/sysv/inode.c | |
parent | f6cec0ae58c17522a7bc4e2f39dae19f199ab534 (diff) | |
parent | dca332528bc69e05f67161e1ed59929633d5e63d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
no need for list_for_each_entry_safe()/resetting with superblock list
Fix sget() race with failing mount
vfs: don't hold s_umount over close_bdev_exclusive() call
sysv: do not mark superblock dirty on remount
sysv: do not mark superblock dirty on mount
btrfs: remove junk sb_dirt change
BFS: clean up the superblock usage
AFFS: wait for sb synchronization when needed
AFFS: clean up dirty flag usage
cifs: truncate fallout
mbcache: fix shrinker function return value
mbcache: Remove unused features
add f_flags to struct statfs(64)
pass a struct path to vfs_statfs
update VFS documentation for method changes.
All filesystems that need invalidate_inode_buffers() are doing that explicitly
convert remaining ->clear_inode() to ->evict_inode()
Make ->drop_inode() just return whether inode needs to be dropped
fs/inode.c:clear_inode() is gone
fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
...
Fix up trivial conflicts in fs/nilfs2/super.c
Diffstat (limited to 'fs/sysv/inode.c')
-rw-r--r-- | fs/sysv/inode.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index d4a5380b5669..de44d067b9e6 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -71,8 +71,8 @@ static int sysv_remount(struct super_block *sb, int *flags, char *data) | |||
71 | lock_super(sb); | 71 | lock_super(sb); |
72 | if (sbi->s_forced_ro) | 72 | if (sbi->s_forced_ro) |
73 | *flags |= MS_RDONLY; | 73 | *flags |= MS_RDONLY; |
74 | if (!(*flags & MS_RDONLY)) | 74 | if (*flags & MS_RDONLY) |
75 | sb->s_dirt = 1; | 75 | sysv_write_super(sb); |
76 | unlock_super(sb); | 76 | unlock_super(sb); |
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
@@ -308,12 +308,17 @@ int sysv_sync_inode(struct inode *inode) | |||
308 | return __sysv_write_inode(inode, 1); | 308 | return __sysv_write_inode(inode, 1); |
309 | } | 309 | } |
310 | 310 | ||
311 | static void sysv_delete_inode(struct inode *inode) | 311 | static void sysv_evict_inode(struct inode *inode) |
312 | { | 312 | { |
313 | truncate_inode_pages(&inode->i_data, 0); | 313 | truncate_inode_pages(&inode->i_data, 0); |
314 | inode->i_size = 0; | 314 | if (!inode->i_nlink) { |
315 | sysv_truncate(inode); | 315 | inode->i_size = 0; |
316 | sysv_free_inode(inode); | 316 | sysv_truncate(inode); |
317 | } | ||
318 | invalidate_inode_buffers(inode); | ||
319 | end_writeback(inode); | ||
320 | if (!inode->i_nlink) | ||
321 | sysv_free_inode(inode); | ||
317 | } | 322 | } |
318 | 323 | ||
319 | static struct kmem_cache *sysv_inode_cachep; | 324 | static struct kmem_cache *sysv_inode_cachep; |
@@ -344,7 +349,7 @@ const struct super_operations sysv_sops = { | |||
344 | .alloc_inode = sysv_alloc_inode, | 349 | .alloc_inode = sysv_alloc_inode, |
345 | .destroy_inode = sysv_destroy_inode, | 350 | .destroy_inode = sysv_destroy_inode, |
346 | .write_inode = sysv_write_inode, | 351 | .write_inode = sysv_write_inode, |
347 | .delete_inode = sysv_delete_inode, | 352 | .evict_inode = sysv_evict_inode, |
348 | .put_super = sysv_put_super, | 353 | .put_super = sysv_put_super, |
349 | .write_super = sysv_write_super, | 354 | .write_super = sysv_write_super, |
350 | .sync_fs = sysv_sync_fs, | 355 | .sync_fs = sysv_sync_fs, |