summaryrefslogtreecommitdiffstats
path: root/include/linux/ptrace.h
diff options
context:
space:
mode:
authorJan Kara2008-02-06 10:37:36 +0100
committerLinus Torvalds2008-02-06 19:41:07 +0100
commit941d2380e979dfefb6c824452e9f42be3ef948ee (patch)
tree4aad1ad817fb2043b8191ef77ec96845b9c24313 /include/linux/ptrace.h
parentdrivers/char: use LIST_HEAD instead of LIST_HEAD_INIT (diff)
downloadkernel-qcow2-linux-941d2380e979dfefb6c824452e9f42be3ef948ee.tar.gz
kernel-qcow2-linux-941d2380e979dfefb6c824452e9f42be3ef948ee.tar.xz
kernel-qcow2-linux-941d2380e979dfefb6c824452e9f42be3ef948ee.zip
quota: improve inode list scanning in add_dquot_ref()
We restarted scan of sb->s_inodes list whenever we had to drop inode_lock in add_dquot_ref(). This leads to overall quadratic running time and thus add_dquot_ref() can take several minutes when called on a life filesystem. We fix the problem by using the fact that inode cannot be removed from s_inodes list while we hold a reference to it and thus we can safely restart the scan if we don't drop the reference. Here we use the fact that inodes freshly added to s_inodes list are already guaranteed to have quotas properly initialized and the ordering of inodes on s_inodes list does not change so we cannot skip any inode. Thanks goes to Nick <gentuu@gmail.com> for analyzing the problem and testing the fix. [akpm@linux-foundation.org: iput(NULL) is legal] Signed-off-by: Jan Kara <jack@suse.cz> Cc: Nick <gentuu@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/ptrace.h')
0 files changed, 0 insertions, 0 deletions