aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/9p/vfs_inode.c5
-rw-r--r--include/net/9p/9p.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 23581bcb599b..5c5137c11484 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -77,6 +77,8 @@ static int unixmode2p9mode(struct v9fs_session_info *v9ses, int mode)
77 res |= P9_DMSETUID; 77 res |= P9_DMSETUID;
78 if ((mode & S_ISGID) == S_ISGID) 78 if ((mode & S_ISGID) == S_ISGID)
79 res |= P9_DMSETGID; 79 res |= P9_DMSETGID;
80 if ((mode & S_ISVTX) == S_ISVTX)
81 res |= P9_DMSETVTX;
80 if ((mode & P9_DMLINK)) 82 if ((mode & P9_DMLINK))
81 res |= P9_DMLINK; 83 res |= P9_DMLINK;
82 } 84 }
@@ -119,6 +121,9 @@ static int p9mode2unixmode(struct v9fs_session_info *v9ses, int mode)
119 121
120 if ((mode & P9_DMSETGID) == P9_DMSETGID) 122 if ((mode & P9_DMSETGID) == P9_DMSETGID)
121 res |= S_ISGID; 123 res |= S_ISGID;
124
125 if ((mode & P9_DMSETVTX) == P9_DMSETVTX)
126 res |= S_ISVTX;
122 } 127 }
123 128
124 return res; 129 return res;
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 625346c47ee2..585eb4496990 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -124,6 +124,7 @@ enum {
124 P9_DMSOCKET = 0x00100000, 124 P9_DMSOCKET = 0x00100000,
125 P9_DMSETUID = 0x00080000, 125 P9_DMSETUID = 0x00080000,
126 P9_DMSETGID = 0x00040000, 126 P9_DMSETGID = 0x00040000,
127 P9_DMSETVTX = 0x00010000,
127}; 128};
128 129
129/* qid.types */ 130/* qid.types */