Skip to content

Commit 87de39e

Browse files
zhashaericvh
authored andcommitted
fs/9p: translate O_TRUNC into OTRUNC
This one hits both 9P2000 and .u as it appears v9fs has never translated the O_TRUNC flag. Signed-off-by: Joakim Sindholt <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
1 parent cd25e15 commit 87de39e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/9p/vfs_inode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ int v9fs_uflags2omode(int uflags, int extended)
178178
break;
179179
}
180180

181+
if (uflags & O_TRUNC)
182+
ret |= P9_OTRUNC;
183+
181184
if (extended) {
182185
if (uflags & O_EXCL)
183186
ret |= P9_OEXCL;

0 commit comments

Comments
 (0)