aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/client.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 30c4a1b224f..fbd2b195801 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1803,3 +1803,36 @@ error:
1803 1803
1804} 1804}
1805EXPORT_SYMBOL(p9_client_mkdir_dotl); 1805EXPORT_SYMBOL(p9_client_mkdir_dotl);
1806
1807int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status)
1808{
1809 int err;
1810 struct p9_client *clnt;
1811 struct p9_req_t *req;
1812
1813 err = 0;
1814 clnt = fid->clnt;
1815 P9_DPRINTK(P9_DEBUG_9P, ">>> TLOCK fid %d type %i flags %d "
1816 "start %lld length %lld proc_id %d client_id %s\n",
1817 fid->fid, flock->type, flock->flags, flock->start,
1818 flock->length, flock->proc_id, flock->client_id);
1819
1820 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type,
1821 flock->flags, flock->start, flock->length,
1822 flock->proc_id, flock->client_id);
1823
1824 if (IS_ERR(req))
1825 return PTR_ERR(req);
1826
1827 err = p9pdu_readf(req->rc, clnt->proto_version, "b", status);
1828 if (err) {
1829 p9pdu_dump(1, req->rc);
1830 goto error;
1831 }
1832 P9_DPRINTK(P9_DEBUG_9P, "<<< RLOCK status %i\n", *status);
1833error:
1834 p9_free_req(clnt, req);
1835 return err;
1836
1837}
1838EXPORT_SYMBOL(p9_client_lock_dotl);