diff options
-rw-r--r-- | include/net/9p/9p.h | 2 | ||||
-rw-r--r-- | include/net/9p/client.h | 1 | ||||
-rw-r--r-- | net/9p/client.c | 25 |
3 files changed, 28 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 6fabb5e559ba..a8de812ccbc8 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -155,6 +155,8 @@ enum p9_msg_t { | |||
155 | P9_RSETATTR, | 155 | P9_RSETATTR, |
156 | P9_TXATTRWALK = 30, | 156 | P9_TXATTRWALK = 30, |
157 | P9_RXATTRWALK, | 157 | P9_RXATTRWALK, |
158 | P9_TXATTRCREATE = 32, | ||
159 | P9_RXATTRCREATE, | ||
158 | P9_TREADDIR = 40, | 160 | P9_TREADDIR = 40, |
159 | P9_RREADDIR, | 161 | P9_RREADDIR, |
160 | P9_TLINK = 70, | 162 | P9_TLINK = 70, |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 60398b1a3f75..d1aa2cfb30f0 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -261,5 +261,6 @@ void p9stat_free(struct p9_wstat *); | |||
261 | int p9_is_proto_dotu(struct p9_client *clnt); | 261 | int p9_is_proto_dotu(struct p9_client *clnt); |
262 | int p9_is_proto_dotl(struct p9_client *clnt); | 262 | int p9_is_proto_dotl(struct p9_client *clnt); |
263 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); | 263 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); |
264 | int p9_client_xattrcreate(struct p9_fid *, const char *, u64, int); | ||
264 | 265 | ||
265 | #endif /* NET_9P_CLIENT_H */ | 266 | #endif /* NET_9P_CLIENT_H */ |
diff --git a/net/9p/client.c b/net/9p/client.c index ec80ee71d453..43396acd714a 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1672,6 +1672,31 @@ error: | |||
1672 | } | 1672 | } |
1673 | EXPORT_SYMBOL_GPL(p9_client_xattrwalk); | 1673 | EXPORT_SYMBOL_GPL(p9_client_xattrwalk); |
1674 | 1674 | ||
1675 | int p9_client_xattrcreate(struct p9_fid *fid, const char *name, | ||
1676 | u64 attr_size, int flags) | ||
1677 | { | ||
1678 | int err; | ||
1679 | struct p9_req_t *req; | ||
1680 | struct p9_client *clnt; | ||
1681 | |||
1682 | P9_DPRINTK(P9_DEBUG_9P, | ||
1683 | ">>> TXATTRCREATE fid %d name %s size %lld flag %d\n", | ||
1684 | fid->fid, name, (long long)attr_size, flags); | ||
1685 | err = 0; | ||
1686 | clnt = fid->clnt; | ||
1687 | req = p9_client_rpc(clnt, P9_TXATTRCREATE, "dsqd", | ||
1688 | fid->fid, name, attr_size, flags); | ||
1689 | if (IS_ERR(req)) { | ||
1690 | err = PTR_ERR(req); | ||
1691 | goto error; | ||
1692 | } | ||
1693 | P9_DPRINTK(P9_DEBUG_9P, "<<< RXATTRCREATE fid %d\n", fid->fid); | ||
1694 | p9_free_req(clnt, req); | ||
1695 | error: | ||
1696 | return err; | ||
1697 | } | ||
1698 | EXPORT_SYMBOL_GPL(p9_client_xattrcreate); | ||
1699 | |||
1675 | int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset) | 1700 | int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset) |
1676 | { | 1701 | { |
1677 | int err, rsize, total; | 1702 | int err, rsize, total; |