diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/client.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 431eaef697c7..c4b77f383582 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1666,7 +1666,8 @@ error: | |||
1666 | } | 1666 | } |
1667 | EXPORT_SYMBOL(p9_client_statfs); | 1667 | EXPORT_SYMBOL(p9_client_statfs); |
1668 | 1668 | ||
1669 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name) | 1669 | int p9_client_rename(struct p9_fid *fid, |
1670 | struct p9_fid *newdirfid, const char *name) | ||
1670 | { | 1671 | { |
1671 | int err; | 1672 | int err; |
1672 | struct p9_req_t *req; | 1673 | struct p9_req_t *req; |
@@ -1693,6 +1694,36 @@ error: | |||
1693 | } | 1694 | } |
1694 | EXPORT_SYMBOL(p9_client_rename); | 1695 | EXPORT_SYMBOL(p9_client_rename); |
1695 | 1696 | ||
1697 | int p9_client_renameat(struct p9_fid *olddirfid, const char *old_name, | ||
1698 | struct p9_fid *newdirfid, const char *new_name) | ||
1699 | { | ||
1700 | int err; | ||
1701 | struct p9_req_t *req; | ||
1702 | struct p9_client *clnt; | ||
1703 | |||
1704 | err = 0; | ||
1705 | clnt = olddirfid->clnt; | ||
1706 | |||
1707 | P9_DPRINTK(P9_DEBUG_9P, ">>> TRENAMEAT olddirfid %d old name %s" | ||
1708 | " newdirfid %d new name %s\n", olddirfid->fid, old_name, | ||
1709 | newdirfid->fid, new_name); | ||
1710 | |||
1711 | req = p9_client_rpc(clnt, P9_TRENAMEAT, "dsds", olddirfid->fid, | ||
1712 | old_name, newdirfid->fid, new_name); | ||
1713 | if (IS_ERR(req)) { | ||
1714 | err = PTR_ERR(req); | ||
1715 | goto error; | ||
1716 | } | ||
1717 | |||
1718 | P9_DPRINTK(P9_DEBUG_9P, "<<< RRENAMEAT newdirfid %d new name %s\n", | ||
1719 | newdirfid->fid, new_name); | ||
1720 | |||
1721 | p9_free_req(clnt, req); | ||
1722 | error: | ||
1723 | return err; | ||
1724 | } | ||
1725 | EXPORT_SYMBOL(p9_client_renameat); | ||
1726 | |||
1696 | /* | 1727 | /* |
1697 | * An xattrwalk without @attr_name gives the fid for the lisxattr namespace | 1728 | * An xattrwalk without @attr_name gives the fid for the lisxattr namespace |
1698 | */ | 1729 | */ |