what lock protects sb->s_flags

From: Vasily Averin
Date: Wed Nov 01 2006 - 04:07:23 EST


akpm@xxxxxxxx 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/