cifs: Fix chmod with modefromsid when an older ACE already exists.
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 26 Mar 2021 10:28:16 +0000 (10:28 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 26 Mar 2021 23:04:35 +0000 (18:04 -0500)
commit3bffbe9e0b2721bb62d226a4d4211bddae52b00a
treebf478b36e9305e270ee8b4ad7d8efded3a7f1ac2
parent45a4546c6167a2da348a31ca439d8a8ff773b6ea
cifs: Fix chmod with modefromsid when an older ACE already exists.

My recent fixes to cifsacl to maintain inherited ACEs had
regressed modefromsid when an older ACL already exists.

Found testing xfstest 495 with modefromsid mount option

Fixes: f5065508897a ("cifs: Retain old ACEs when converting between mode bits and ACL")

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsacl.c