diff options
author | Jan Kara <jack@suse.cz> | 2007-05-17 09:11:19 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-17 16:23:05 +0400 |
commit | 7925409e202a41176b729671eab6e610a54153cd (patch) | |
tree | 7b97858fa33169a1616cc6f1e05b66117e97c1b3 /fs/dquot.c | |
parent | bb49b32fece7910fbb02a6934bca4495596f6c8c (diff) | |
download | linux-7925409e202a41176b729671eab6e610a54153cd.tar.xz |
circular locking dependency found in QUOTA OFF
i_mutex on quota files is special. Unlike i_mutexes for other inodes it is
acquired under dqonoff_mutex. Tell lockdep about this lock ranking. Also
comment and code in quota_sync_sb() seem to be bogus (as i_mutex for quota
file can be acquired under dqonoff_mutex). Move truncate_inode_pages()
call under dqonoff_mutex and save some problems with races...
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>
Diffstat (limited to 'fs/dquot.c')
-rw-r--r-- | fs/dquot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index 3a995841de90..8819d281500c 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -1421,7 +1421,7 @@ int vfs_quota_off(struct super_block *sb, int type) /* If quota was reenabled in the meantime, we have * nothing to do */ if (!sb_has_quota_enabled(sb, cnt)) { - mutex_lock(&toputinode[cnt]->i_mutex); + mutex_lock_nested(&toputinode[cnt]->i_mutex, I_MUTEX_QUOTA); toputinode[cnt]->i_flags &= ~(S_IMMUTABLE | S_NOATIME | S_NOQUOTA); truncate_inode_pages(&toputinode[cnt]->i_data, 0); |