diff options
author | Vladimir Davydov <[email protected]> | 2013-03-22 15:04:51 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-03-22 16:41:21 -0700 |
commit | 38d78e587d4960d0db94add518d27ee74bad2301 (patch) | |
tree | 3022cdde7ae5acd60be295f3d3fd9c78814e41c4 /tools/perf/util/trace-event-scripting.c | |
parent | ca4b3f302c90de5e516296e581c31c80125cd24b (diff) |
mqueue: sys_mq_open: do not call mnt_drop_write() if read-only
mnt_drop_write() must be called only if mnt_want_write() succeeded,
otherwise the mnt_writers counter will diverge.
mnt_writers counters are used to check if remounting FS as read-only is
OK, so after an extra mnt_drop_write() call, it would be impossible to
remount mqueue FS as read-only. Besides, on umount a warning would be
printed like this one:
=====================================
[ BUG: bad unlock balance detected! ]
3.9.0-rc3 #5 Not tainted
-------------------------------------
a.out/12486 is trying to release lock (sb_writers) at:
mnt_drop_write+0x1f/0x30
but there are no more locks to release!
Signed-off-by: Vladimir Davydov <[email protected]>
Cc: Doug Ledford <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Al Viro <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions