[PATCH review 10/13] vfs: Generalize filesystem nodev handling.

Eric W. Biederman ebiederm at xmission.com
Tue Jun 21 19:09:58 UTC 2016


Andy Lutomirski <luto at amacapital.net> writes:

> On Mon, Jun 20, 2016 at 10:21 AM, Eric W. Biederman
> <ebiederm at xmission.com> wrote:
>> Introduce a function may_open_dev that tests MNT_NODEV and a new
>> superblock flab SB_I_NODEV.  Use this new function in all of the
>> places where MNT_NODEV was previously tested.
>
> This would be nicer as two patches: one to refactor the check and the
> second to change the condition.

I can see where introducing may_open_dev before changing the conditions
in may_open_dev might have been a a hair more readable.   At the same
time that approaches the ridiculously small patches, and this change
is one clear focused change (introduce and test SB_I_NODEV) and the
change is small enough I don't see anything getting lost in the noise.

I did very deliberately separate this from
"12/13 userns: Remove implicit MNT_NODEV fragility."
As a combination there would have been very confusing.

Which is the really interesting result as it removes that stupid
unnecessary difference between mounts inside and outside of user
namespaces.

Eric


More information about the Containers mailing list