You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: saving negative to unsigned char 9p: return on mutex_lock_interruptible() 9p: Creating files with names too long should fail with ENAMETOOLONG. 9p: Make sure we are able to clunk the cached fid on umount 9p: drop nlink remove fs/9p: Clunk the fid resulting from partial walk of the name 9p: documentation update 9p: Fix setting of protocol flags in v9fs_session_info structure.
This commit is contained in:
+19
-4
@@ -72,9 +72,10 @@ inline int p9_is_proto_dotu(struct p9_client *clnt)
|
||||
EXPORT_SYMBOL(p9_is_proto_dotu);
|
||||
|
||||
/* Interpret mount option for protocol version */
|
||||
static unsigned char get_protocol_version(const substring_t *name)
|
||||
static int get_protocol_version(const substring_t *name)
|
||||
{
|
||||
unsigned char version = -EINVAL;
|
||||
int version = -EINVAL;
|
||||
|
||||
if (!strncmp("9p2000", name->from, name->to-name->from)) {
|
||||
version = p9_proto_legacy;
|
||||
P9_DPRINTK(P9_DEBUG_9P, "Protocol version: Legacy\n");
|
||||
@@ -534,7 +535,12 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
|
||||
|
||||
P9_DPRINTK(P9_DEBUG_MUX, "client %p op %d\n", c, type);
|
||||
|
||||
if (c->status != Connected)
|
||||
/* we allow for any status other than disconnected */
|
||||
if (c->status == Disconnected)
|
||||
return ERR_PTR(-EIO);
|
||||
|
||||
/* if status is begin_disconnected we allow only clunk request */
|
||||
if ((c->status == BeginDisconnect) && (type != P9_TCLUNK))
|
||||
return ERR_PTR(-EIO);
|
||||
|
||||
if (signal_pending(current)) {
|
||||
@@ -800,8 +806,10 @@ void p9_client_destroy(struct p9_client *clnt)
|
||||
|
||||
v9fs_put_trans(clnt->trans_mod);
|
||||
|
||||
list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist)
|
||||
list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist) {
|
||||
printk(KERN_INFO "Found fid %d not clunked\n", fid->fid);
|
||||
p9_fid_destroy(fid);
|
||||
}
|
||||
|
||||
if (clnt->fidpool)
|
||||
p9_idpool_destroy(clnt->fidpool);
|
||||
@@ -819,6 +827,13 @@ void p9_client_disconnect(struct p9_client *clnt)
|
||||
}
|
||||
EXPORT_SYMBOL(p9_client_disconnect);
|
||||
|
||||
void p9_client_begin_disconnect(struct p9_client *clnt)
|
||||
{
|
||||
P9_DPRINTK(P9_DEBUG_9P, "clnt %p\n", clnt);
|
||||
clnt->status = BeginDisconnect;
|
||||
}
|
||||
EXPORT_SYMBOL(p9_client_begin_disconnect);
|
||||
|
||||
struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid,
|
||||
char *uname, u32 n_uname, char *aname)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user