[PATCH] afs: Fix updating of i_mode due to 3rd party change

Al Viro viro at zeniv.linux.org.uk
Wed Feb 10 13:48:03 EST 2021


On Wed, Feb 10, 2021 at 08:59:52AM +0000, David Howells wrote:
> Fix afs_apply_status() to mask off the irrelevant bits from status->mode
> when OR'ing them into i_mode.  This can happen when a 3rd party chmod
> occurs.
> 
> Also fix afs_inode_init_from_status() to mask off the mode bits when
> initialising i_mode.

afd_inode_init_from_status() would be better off with
	status->mode &= S_IALLUGO;
before the switch, seeing that normally it has all-zeroes in type bits anyway.



More information about the linux-afs mailing list