Skip to contentSkip to conversation

what lock protects sb->s_flags

DISCUSSION Vasily Averin 1 participant 1 message Nov 1, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · [email protected] wrote:

Subject: VFS: BKL is not required for remount_fs()

According to Documentation/filesystems/Locking remount_fs() does not require BKL.

(akpm: what lock _does_ protect sb->s_flags?)

In general s_flags is changed under sb->s_umount (write) semaphore inside various get_sb(), fill_super() and remount_fs() filesystem functions. Exceptions are:
1) do_emergency_remount -- where s_umount(read) is taken,
2) various filesystem error-handlers (like ext3_abort() and reiserfs_abort()), when filesystem "remounted" to read-only without any locks.

Thank you,
Vasily Averin