diff options
author | Jan Kara <jack@suse.cz> | 2012-12-05 08:40:14 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 13:57:36 -0500 |
commit | 72651cac884b1e285fa8e8314b10e9f1b8458802 (patch) | |
tree | 8872407cd5c36f52054c18f11b7b8470dccb1d6e | |
parent | 39e3c9553f34381a1b664c27b0c696a266a5735e (diff) |
fs: Fix imbalance in freeze protection in mark_files_ro()
File descriptors (even those for writing) do not hold freeze protection.
Thus mark_files_ro() must call __mnt_drop_write() to only drop protection
against remount read-only. Calling mnt_drop_write_file() as we do now
results in:
[ BUG: bad unlock balance detected! ]
3.7.0-rc6-00028-g88e75b6 #101 Not tainted
-------------------------------------
kworker/1:2/79 is trying to release lock (sb_writers) at:
[<ffffffff811b33b4>] mnt_drop_write+0x24/0x30
but there are no more locks to release!
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/file_table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index a72bf9ddd0d2..de9e9653d611 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -458,8 +458,8 @@ void mark_files_ro(struct super_block *sb) | |||
458 | spin_unlock(&f->f_lock); | 458 | spin_unlock(&f->f_lock); |
459 | if (file_check_writeable(f) != 0) | 459 | if (file_check_writeable(f) != 0) |
460 | continue; | 460 | continue; |
461 | __mnt_drop_write(f->f_path.mnt); | ||
461 | file_release_write(f); | 462 | file_release_write(f); |
462 | mnt_drop_write_file(f); | ||
463 | } while_file_list_for_each_entry; | 463 | } while_file_list_for_each_entry; |
464 | lg_global_unlock(&files_lglock); | 464 | lg_global_unlock(&files_lglock); |
465 | } | 465 | } |