]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
quota: add possibly missing iput() when quotaon and quotaoff races
authorJan Kara <jack@suse.cz>
Thu, 20 Mar 2008 00:00:46 +0000 (17:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Mar 2008 01:53:35 +0000 (18:53 -0700)
We should always put inode we have reference to, even if quota was reenabled
in the mean time.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dquot.c

index 9c7feb62eed153ae9ef923c4767d506a14250189..41b9dbd68b0e88e4a466685e1150e262e5d03c59 100644 (file)
@@ -1522,8 +1522,8 @@ int vfs_quota_off(struct super_block *sb, int type)
                                truncate_inode_pages(&toputinode[cnt]->i_data, 0);
                                mutex_unlock(&toputinode[cnt]->i_mutex);
                                mark_inode_dirty(toputinode[cnt]);
-                               iput(toputinode[cnt]);
                        }
+                       iput(toputinode[cnt]);
                        mutex_unlock(&dqopt->dqonoff_mutex);
                }
        if (sb->s_bdev)