diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-27 19:23:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-27 19:23:12 -0400 |
commit | 3ae5080f4c2e293229508dabe7c8a90af4e4c460 (patch) | |
tree | 9cb11f26905a82b7fac9d3b8f9d61d58bc5c94b0 /fs/quota/dquot.c | |
parent | 2c9e15a011c55ff96b2b8d2b126d1b9a96abba20 (diff) | |
parent | aabb8fdb41128705fd1627f56fdd571e45fdbcdb (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: (37 commits)
fs: avoid I_NEW inodes
Merge code for single and multiple-instance mounts
Remove get_init_pts_sb()
Move common mknod_ptmx() calls into caller
Parse mount options just once and copy them to super block
Unroll essentials of do_remount_sb() into devpts
vfs: simple_set_mnt() should return void
fs: move bdev code out of buffer.c
constify dentry_operations: rest
constify dentry_operations: configfs
constify dentry_operations: sysfs
constify dentry_operations: JFS
constify dentry_operations: OCFS2
constify dentry_operations: GFS2
constify dentry_operations: FAT
constify dentry_operations: FUSE
constify dentry_operations: procfs
constify dentry_operations: ecryptfs
constify dentry_operations: CIFS
constify dentry_operations: AFS
...
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r-- | fs/quota/dquot.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index eb938015bd91..2ca967a5ef77 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -823,12 +823,12 @@ static void add_dquot_ref(struct super_block *sb, int type) | |||
823 | 823 | ||
824 | spin_lock(&inode_lock); | 824 | spin_lock(&inode_lock); |
825 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { | 825 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { |
826 | if (inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) | ||
827 | continue; | ||
826 | if (!atomic_read(&inode->i_writecount)) | 828 | if (!atomic_read(&inode->i_writecount)) |
827 | continue; | 829 | continue; |
828 | if (!dqinit_needed(inode, type)) | 830 | if (!dqinit_needed(inode, type)) |
829 | continue; | 831 | continue; |
830 | if (inode->i_state & (I_FREEING|I_WILL_FREE)) | ||
831 | continue; | ||
832 | 832 | ||
833 | __iget(inode); | 833 | __iget(inode); |
834 | spin_unlock(&inode_lock); | 834 | spin_unlock(&inode_lock); |
@@ -915,6 +915,12 @@ static void remove_dquot_ref(struct super_block *sb, int type, | |||
915 | 915 | ||
916 | spin_lock(&inode_lock); | 916 | spin_lock(&inode_lock); |
917 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { | 917 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { |
918 | /* | ||
919 | * We have to scan also I_NEW inodes because they can already | ||
920 | * have quota pointer initialized. Luckily, we need to touch | ||
921 | * only quota pointers and these have separate locking | ||
922 | * (dqptr_sem). | ||
923 | */ | ||
918 | if (!IS_NOQUOTA(inode)) | 924 | if (!IS_NOQUOTA(inode)) |
919 | remove_inode_dquot_ref(inode, type, tofree_head); | 925 | remove_inode_dquot_ref(inode, type, tofree_head); |
920 | } | 926 | } |