This repository has been archived on 2026-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ubports_kernel_google_msm/include/linux
Miklos Szeredi 4ed5e82fe7 vfs: protect remounting superblock read-only
Currently remouting superblock read-only is racy in a major way.

With the per mount read-only infrastructure it is now possible to
prevent most races, which this patch attempts.

Before starting the remount read-only, iterate through all mounts
belonging to the superblock and if none of them have any pending
writes, set sb->s_readonly_remount.  This indicates that remount is in
progress and no further write requests are allowed.  If the remount
succeeds set MS_RDONLY and reset s_readonly_remount.

If the remounting is unsuccessful just reset s_readonly_remount.
This can result in transient EROFS errors, despite the fact the
remount failed.  Unfortunately hodling off writes is difficult as
remount itself may touch the filesystem (e.g. through load_nls())
which would deadlock.

A later patch deals with delayed writes due to nlink going to zero.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-06 23:20:12 -05:00
..
2011-11-07 09:11:16 -08:00
2012-01-03 22:55:04 -05:00
2011-11-02 16:07:03 -07:00
2011-10-26 15:43:25 -04:00
2012-01-03 22:55:17 -05:00
2011-11-16 09:21:50 +01:00
2012-01-03 22:55:03 -05:00
2011-09-27 09:25:02 +01:00
2012-01-03 22:54:57 -05:00
2012-01-03 22:54:56 -05:00
2011-11-07 23:54:53 +01:00
2011-10-31 20:19:04 +00:00
2012-01-03 22:54:58 -05:00
2011-11-23 11:33:07 +01:00
2012-01-03 22:54:56 -05:00
2011-10-30 04:43:30 -04:00
2012-01-03 22:55:17 -05:00
2011-09-27 18:08:04 +02:00
2011-09-25 19:52:59 +03:00
2012-01-03 22:55:15 -05:00
2011-11-02 16:06:57 -07:00
2011-10-31 14:03:22 +01:00
2011-11-22 16:37:01 -05:00
2011-11-02 16:07:02 -07:00
2012-01-03 22:54:56 -05:00
2012-01-03 22:55:07 -05:00
2012-01-03 22:55:00 -05:00
2012-01-03 22:54:56 -05:00
2012-01-03 22:52:40 -05:00
2011-11-29 11:59:50 +00:00
2011-10-31 17:30:47 -07:00
2012-01-03 22:54:56 -05:00
2011-10-03 14:01:21 -04:00
2012-01-03 22:55:17 -05:00
2011-11-02 16:07:02 -07:00