public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Greg KH <greg@kroah•com>, Trond Myklebust <trondmy@gmail•com>
Cc: Linux Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	NeilBrown <neilb@suse•com>
Subject: linux-next: manual merge of the driver-core tree with the nfs tree
Date: Mon, 8 Jul 2019 18:44:02 +1000	[thread overview]
Message-ID: <20190708184402.4cd912ac@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3254 bytes --]

Hi all,

Today's linux-next merge of the driver-core tree got a conflict in:

  net/sunrpc/debugfs.c

between commit:

  2f34b8bfae19 ("SUNRPC: add links for all client xprts to debugfs")

from the nfs tree and commit:

  0a0762c6c604 ("sunrpc: no need to check return value of debugfs_create functions")

from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/sunrpc/debugfs.c
index 105bea190a45,707d7aab1546..000000000000
--- a/net/sunrpc/debugfs.c
+++ b/net/sunrpc/debugfs.c
@@@ -118,60 -117,40 +117,52 @@@ static const struct file_operations tas
  	.release	= tasks_release,
  };
  
 +static int do_xprt_debugfs(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *numv)
 +{
 +	int len;
 +	char name[24]; /* enough for "../../rpc_xprt/ + 8 hex digits + NULL */
 +	char link[9]; /* enough for 8 hex digits + NULL */
 +	int *nump = numv;
 +
 +	if (IS_ERR_OR_NULL(xprt->debugfs))
 +		return 0;
 +	len = snprintf(name, sizeof(name), "../../rpc_xprt/%s",
 +		       xprt->debugfs->d_name.name);
 +	if (len > sizeof(name))
 +		return -1;
 +	if (*nump == 0)
 +		strcpy(link, "xprt");
 +	else {
 +		len = snprintf(link, sizeof(link), "xprt%d", *nump);
 +		if (len > sizeof(link))
 +			return -1;
 +	}
- 	if (!debugfs_create_symlink(link, clnt->cl_debugfs, name))
- 		return -1;
++	debugfs_create_symlink(link, clnt->cl_debugfs, name);
 +	(*nump)++;
 +	return 0;
 +}
 +
  void
  rpc_clnt_debugfs_register(struct rpc_clnt *clnt)
  {
  	int len;
 -	char name[24]; /* enough for "../../rpc_xprt/ + 8 hex digits + NULL */
 -	struct rpc_xprt *xprt;
 +	char name[9]; /* enough for 8 hex digits + NULL */
 +	int xprtnum = 0;
  
- 	/* Already registered? */
- 	if (clnt->cl_debugfs || !rpc_clnt_dir)
- 		return;
- 
  	len = snprintf(name, sizeof(name), "%x", clnt->cl_clid);
  	if (len >= sizeof(name))
  		return;
  
  	/* make the per-client dir */
  	clnt->cl_debugfs = debugfs_create_dir(name, rpc_clnt_dir);
- 	if (!clnt->cl_debugfs)
- 		return;
  
  	/* make tasks file */
- 	if (!debugfs_create_file("tasks", S_IFREG | 0400, clnt->cl_debugfs,
- 				 clnt, &tasks_fops))
- 		goto out_err;
+ 	debugfs_create_file("tasks", S_IFREG | 0400, clnt->cl_debugfs, clnt,
+ 			    &tasks_fops);
  
 -	rcu_read_lock();
 -	xprt = rcu_dereference(clnt->cl_xprt);
 -	/* no "debugfs" dentry? Don't bother with the symlink. */
 -	if (IS_ERR_OR_NULL(xprt->debugfs)) {
 -		rcu_read_unlock();
 -		return;
 -	}
 -	len = snprintf(name, sizeof(name), "../../rpc_xprt/%s",
 -			xprt->debugfs->d_name.name);
 -	rcu_read_unlock();
 -
 -	if (len >= sizeof(name))
 +	if (rpc_clnt_iterate_for_each_xprt(clnt, do_xprt_debugfs, &xprtnum) < 0)
  		goto out_err;
  
 -	debugfs_create_symlink("xprt", clnt->cl_debugfs, name);
 -
  	return;
  out_err:
  	debugfs_remove_recursive(clnt->cl_debugfs);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

                 reply	other threads:[~2019-07-08  8:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708184402.4cd912ac@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=greg@kroah$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=neilb@suse$(echo .)com \
    --cc=trondmy@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox