diff options
Diffstat (limited to 'net/9p/client.c')
-rw-r--r-- | net/9p/client.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index fbd2b195801c..fc1b0579016a 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1836,3 +1836,37 @@ error: | |||
1836 | 1836 | ||
1837 | } | 1837 | } |
1838 | EXPORT_SYMBOL(p9_client_lock_dotl); | 1838 | EXPORT_SYMBOL(p9_client_lock_dotl); |
1839 | |||
1840 | int p9_client_getlock_dotl(struct p9_fid *fid, struct p9_getlock *glock) | ||
1841 | { | ||
1842 | int err; | ||
1843 | struct p9_client *clnt; | ||
1844 | struct p9_req_t *req; | ||
1845 | |||
1846 | err = 0; | ||
1847 | clnt = fid->clnt; | ||
1848 | P9_DPRINTK(P9_DEBUG_9P, ">>> TGETLOCK fid %d, type %i start %lld " | ||
1849 | "length %lld proc_id %d client_id %s\n", fid->fid, glock->type, | ||
1850 | glock->start, glock->length, glock->proc_id, glock->client_id); | ||
1851 | |||
1852 | req = p9_client_rpc(clnt, P9_TGETLOCK, "dbqqds", fid->fid, glock->type, | ||
1853 | glock->start, glock->length, glock->proc_id, glock->client_id); | ||
1854 | |||
1855 | if (IS_ERR(req)) | ||
1856 | return PTR_ERR(req); | ||
1857 | |||
1858 | err = p9pdu_readf(req->rc, clnt->proto_version, "bqqds", &glock->type, | ||
1859 | &glock->start, &glock->length, &glock->proc_id, | ||
1860 | &glock->client_id); | ||
1861 | if (err) { | ||
1862 | p9pdu_dump(1, req->rc); | ||
1863 | goto error; | ||
1864 | } | ||
1865 | P9_DPRINTK(P9_DEBUG_9P, "<<< RGETLOCK type %i start %lld length %lld " | ||
1866 | "proc_id %d client_id %s\n", glock->type, glock->start, | ||
1867 | glock->length, glock->proc_id, glock->client_id); | ||
1868 | error: | ||
1869 | p9_free_req(clnt, req); | ||
1870 | return err; | ||
1871 | } | ||
1872 | EXPORT_SYMBOL(p9_client_getlock_dotl); | ||