fs/9p: translate O_TRUNC into OTRUNC
[ Upstream commit 87de39e70503e04ddb58965520b15eb9efa7eef3 ] This one hits both 9P2000 and .u as it appears v9fs has never translated the O_TRUNC flag. Signed-off-by: Joakim Sindholt <opensource@zhasha.com> Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 0ce2676013818e62b18504d39211b65d8b54bc24) Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
This commit is contained in:
committed by
Vegard Nossum
parent
99b4d7e3ea
commit
83f6d606db
@@ -192,6 +192,9 @@ int v9fs_uflags2omode(int uflags, int extended)
|
||||
break;
|
||||
}
|
||||
|
||||
if (uflags & O_TRUNC)
|
||||
ret |= P9_OTRUNC;
|
||||
|
||||
if (extended) {
|
||||
if (uflags & O_EXCL)
|
||||
ret |= P9_OEXCL;
|
||||
|
||||
Reference in New Issue
Block a user