linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the vfs tree with the nfsd tree
@ 2019-07-08  1:06 Stephen Rothwell
  2019-07-08 12:45 ` J. Bruce Fields
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2019-07-08  1:06 UTC (permalink / raw)
  To: Al Viro, J. Bruce Fields
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, David Howells

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

Hi all,

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

  fs/nfsd/nfsctl.c

between commits:

  e8a79fb14f6b ("nfsd: add nfsd/clients directory")

from the nfsd tree and commit:

  96a374a35f82 ("vfs: Convert nfsctl to use the new mount API")

from the vfs tree.

I fixed it up (Maybe? 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 fs/nfsd/nfsctl.c
index 4683ba5c69c7,bbff9c4ac49f..000000000000
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@@ -1149,201 -1148,8 +1150,201 @@@ static ssize_t write_v4_end_grace(struc
   *	populating the filesystem.
   */
  
 +/* Basically copying rpc_get_inode. */
 +static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode)
 +{
 +	struct inode *inode = new_inode(sb);
 +	if (!inode)
 +		return NULL;
 +	/* Following advice from simple_fill_super documentation: */
 +	inode->i_ino = iunique(sb, NFSD_MaxReserved);
 +	inode->i_mode = mode;
 +	inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
 +	switch (mode & S_IFMT) {
 +	case S_IFDIR:
 +		inode->i_fop = &simple_dir_operations;
 +		inode->i_op = &simple_dir_inode_operations;
 +		inc_nlink(inode);
 +	default:
 +		break;
 +	}
 +	return inode;
 +}
 +
 +static int __nfsd_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 +{
 +	struct inode *inode;
 +
 +	inode = nfsd_get_inode(dir->i_sb, mode);
 +	if (!inode)
 +		return -ENOMEM;
 +	d_add(dentry, inode);
 +	inc_nlink(dir);
 +	fsnotify_mkdir(dir, dentry);
 +	return 0;
 +}
 +
 +static struct dentry *nfsd_mkdir(struct dentry *parent, struct nfsdfs_client *ncl, char *name)
 +{
 +	struct inode *dir = parent->d_inode;
 +	struct dentry *dentry;
 +	int ret = -ENOMEM;
 +
 +	inode_lock(dir);
 +	dentry = d_alloc_name(parent, name);
 +	if (!dentry)
 +		goto out_err;
 +	ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600);
 +	if (ret)
 +		goto out_err;
 +	if (ncl) {
 +		d_inode(dentry)->i_private = ncl;
 +		kref_get(&ncl->cl_ref);
 +	}
 +out:
 +	inode_unlock(dir);
 +	return dentry;
 +out_err:
 +	dentry = ERR_PTR(ret);
 +	goto out;
 +}
 +
 +static void clear_ncl(struct inode *inode)
 +{
 +	struct nfsdfs_client *ncl = inode->i_private;
 +
 +	inode->i_private = NULL;
 +	synchronize_rcu();
 +	kref_put(&ncl->cl_ref, ncl->cl_release);
 +}
 +
 +
 +struct nfsdfs_client *__get_nfsdfs_client(struct inode *inode)
 +{
 +	struct nfsdfs_client *nc = inode->i_private;
 +
 +	if (nc)
 +		kref_get(&nc->cl_ref);
 +	return nc;
 +}
 +
 +struct nfsdfs_client *get_nfsdfs_client(struct inode *inode)
 +{
 +	struct nfsdfs_client *nc;
 +
 +	rcu_read_lock();
 +	nc = __get_nfsdfs_client(inode);
 +	rcu_read_unlock();
 +	return nc;
 +}
 +/* from __rpc_unlink */
 +static void nfsdfs_remove_file(struct inode *dir, struct dentry *dentry)
 +{
 +	int ret;
 +
 +	clear_ncl(d_inode(dentry));
 +	dget(dentry);
 +	ret = simple_unlink(dir, dentry);
 +	d_delete(dentry);
 +	dput(dentry);
 +	WARN_ON_ONCE(ret);
 +}
 +
 +static void nfsdfs_remove_files(struct dentry *root)
 +{
 +	struct dentry *dentry, *tmp;
 +
 +	list_for_each_entry_safe(dentry, tmp, &root->d_subdirs, d_child) {
 +		if (!simple_positive(dentry)) {
 +			WARN_ON_ONCE(1); /* I think this can't happen? */
 +			continue;
 +		}
 +		nfsdfs_remove_file(d_inode(root), dentry);
 +	}
 +}
 +
 +/* XXX: cut'n'paste from simple_fill_super; figure out if we could share
 + * code instead. */
 +static  int nfsdfs_create_files(struct dentry *root,
 +					const struct tree_descr *files)
 +{
 +	struct inode *dir = d_inode(root);
 +	struct inode *inode;
 +	struct dentry *dentry;
 +	int i;
 +
 +	inode_lock(dir);
 +	for (i = 0; files->name && files->name[0]; i++, files++) {
 +		if (!files->name)
 +			continue;
 +		dentry = d_alloc_name(root, files->name);
 +		if (!dentry)
 +			goto out;
 +		inode = nfsd_get_inode(d_inode(root)->i_sb,
 +					S_IFREG | files->mode);
 +		if (!inode) {
 +			dput(dentry);
 +			goto out;
 +		}
 +		inode->i_fop = files->ops;
 +		inode->i_private = __get_nfsdfs_client(dir);
 +		d_add(dentry, inode);
 +		fsnotify_create(dir, dentry);
 +	}
 +	inode_unlock(dir);
 +	return 0;
 +out:
 +	nfsdfs_remove_files(root);
 +	inode_unlock(dir);
 +	return -ENOMEM;
 +}
 +
 +/* on success, returns positive number unique to that client. */
 +struct dentry *nfsd_client_mkdir(struct nfsd_net *nn,
 +		struct nfsdfs_client *ncl, u32 id,
 +		const struct tree_descr *files)
 +{
 +	struct dentry *dentry;
 +	char name[11];
 +	int ret;
 +
 +	sprintf(name, "%u", id);
 +
 +	dentry = nfsd_mkdir(nn->nfsd_client_dir, ncl, name);
 +	if (IS_ERR(dentry)) /* XXX: tossing errors? */
 +		return NULL;
 +	ret = nfsdfs_create_files(dentry, files);
 +	if (ret) {
 +		nfsd_client_rmdir(dentry);
 +		return NULL;
 +	}
 +	return dentry;
 +}
 +
 +/* Taken from __rpc_rmdir: */
 +void nfsd_client_rmdir(struct dentry *dentry)
 +{
 +	struct inode *dir = d_inode(dentry->d_parent);
 +	struct inode *inode = d_inode(dentry);
 +	int ret;
 +
 +	inode_lock(dir);
 +	nfsdfs_remove_files(dentry);
 +	clear_ncl(inode);
 +	dget(dentry);
 +	ret = simple_rmdir(dir, dentry);
 +	WARN_ON_ONCE(ret);
 +	d_delete(dentry);
 +	inode_unlock(dir);
 +}
 +
- static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
+ static int nfsd_fill_super(struct super_block *sb, struct fs_context *fc)
  {
 +	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
 +							nfsd_net_id);
 +	struct dentry *dentry;
 +	int ret;
 +
  	static const struct tree_descr nfsd_files[] = {
  		[NFSD_List] = {"exports", &exports_nfsd_operations, S_IRUGO},
  		[NFSD_Export_features] = {"export_features",
@@@ -1372,23 -1178,33 +1373,39 @@@
  #endif
  		/* last one */ {""}
  	};
- 	get_net(sb->s_fs_info);
 -
 -	return simple_fill_super(sb, 0x6e667364, nfsd_files);
 +	ret = simple_fill_super(sb, 0x6e667364, nfsd_files);
 +	if (ret)
 +		return ret;
 +	dentry = nfsd_mkdir(sb->s_root, NULL, "clients");
 +	if (IS_ERR(dentry))
 +		return PTR_ERR(dentry);
 +	nn->nfsd_client_dir = dentry;
 +	return 0;
+ }
+ 
+ static int nfsd_fs_get_tree(struct fs_context *fc)
+ {
+ 	fc->s_fs_info = get_net(fc->net_ns);
+ 	return vfs_get_super(fc, vfs_get_keyed_super, nfsd_fill_super);
+ }
  
+ static void nfsd_fs_free_fc(struct fs_context *fc)
+ {
+ 	if (fc->s_fs_info)
+ 		put_net(fc->s_fs_info);
  }
  
- static struct dentry *nfsd_mount(struct file_system_type *fs_type,
- 	int flags, const char *dev_name, void *data)
+ static const struct fs_context_operations nfsd_fs_context_ops = {
+ 	.free		= nfsd_fs_free_fc,
+ 	.get_tree	= nfsd_fs_get_tree,
+ };
+ 
+ static int nfsd_init_fs_context(struct fs_context *fc)
  {
- 	struct net *net = current->nsproxy->net_ns;
- 	return mount_ns(fs_type, flags, data, net, net->user_ns, nfsd_fill_super);
+ 	put_user_ns(fc->user_ns);
+ 	fc->user_ns = get_user_ns(fc->net_ns->user_ns);
+ 	fc->ops = &nfsd_fs_context_ops;
+ 	return 0;
  }
  
  static void nfsd_umount(struct super_block *sb)

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the vfs tree with the nfsd tree
  2019-07-08  1:06 linux-next: manual merge of the vfs tree with the nfsd tree Stephen Rothwell
@ 2019-07-08 12:45 ` J. Bruce Fields
  2019-07-08 14:15   ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: J. Bruce Fields @ 2019-07-08 12:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Al Viro, Linux Next Mailing List, Linux Kernel Mailing List,
	David Howells

On Mon, Jul 08, 2019 at 11:06:33AM +1000, Stephen Rothwell wrote:
> Today's linux-next merge of the vfs tree got a conflict in:
> 
>   fs/nfsd/nfsctl.c
> 
> between commits:
> 
>   e8a79fb14f6b ("nfsd: add nfsd/clients directory")
> 
> from the nfsd tree and commit:
> 
>   96a374a35f82 ("vfs: Convert nfsctl to use the new mount API")

I did a fetch of

	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

and looked at the "master" branch and couldn't find that vfs commit.  Am
I looking in the wrong place?

(I'm sure your resolution is fine, I just thought to be careful it might
be nice to run some tests on the merge.)

--b.

> 
> from the vfs tree.
> 
> I fixed it up (Maybe? 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 fs/nfsd/nfsctl.c
> index 4683ba5c69c7,bbff9c4ac49f..000000000000
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@@ -1149,201 -1148,8 +1150,201 @@@ static ssize_t write_v4_end_grace(struc
>    *	populating the filesystem.
>    */
>   
>  +/* Basically copying rpc_get_inode. */
>  +static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode)
>  +{
>  +	struct inode *inode = new_inode(sb);
>  +	if (!inode)
>  +		return NULL;
>  +	/* Following advice from simple_fill_super documentation: */
>  +	inode->i_ino = iunique(sb, NFSD_MaxReserved);
>  +	inode->i_mode = mode;
>  +	inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
>  +	switch (mode & S_IFMT) {
>  +	case S_IFDIR:
>  +		inode->i_fop = &simple_dir_operations;
>  +		inode->i_op = &simple_dir_inode_operations;
>  +		inc_nlink(inode);
>  +	default:
>  +		break;
>  +	}
>  +	return inode;
>  +}
>  +
>  +static int __nfsd_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
>  +{
>  +	struct inode *inode;
>  +
>  +	inode = nfsd_get_inode(dir->i_sb, mode);
>  +	if (!inode)
>  +		return -ENOMEM;
>  +	d_add(dentry, inode);
>  +	inc_nlink(dir);
>  +	fsnotify_mkdir(dir, dentry);
>  +	return 0;
>  +}
>  +
>  +static struct dentry *nfsd_mkdir(struct dentry *parent, struct nfsdfs_client *ncl, char *name)
>  +{
>  +	struct inode *dir = parent->d_inode;
>  +	struct dentry *dentry;
>  +	int ret = -ENOMEM;
>  +
>  +	inode_lock(dir);
>  +	dentry = d_alloc_name(parent, name);
>  +	if (!dentry)
>  +		goto out_err;
>  +	ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600);
>  +	if (ret)
>  +		goto out_err;
>  +	if (ncl) {
>  +		d_inode(dentry)->i_private = ncl;
>  +		kref_get(&ncl->cl_ref);
>  +	}
>  +out:
>  +	inode_unlock(dir);
>  +	return dentry;
>  +out_err:
>  +	dentry = ERR_PTR(ret);
>  +	goto out;
>  +}
>  +
>  +static void clear_ncl(struct inode *inode)
>  +{
>  +	struct nfsdfs_client *ncl = inode->i_private;
>  +
>  +	inode->i_private = NULL;
>  +	synchronize_rcu();
>  +	kref_put(&ncl->cl_ref, ncl->cl_release);
>  +}
>  +
>  +
>  +struct nfsdfs_client *__get_nfsdfs_client(struct inode *inode)
>  +{
>  +	struct nfsdfs_client *nc = inode->i_private;
>  +
>  +	if (nc)
>  +		kref_get(&nc->cl_ref);
>  +	return nc;
>  +}
>  +
>  +struct nfsdfs_client *get_nfsdfs_client(struct inode *inode)
>  +{
>  +	struct nfsdfs_client *nc;
>  +
>  +	rcu_read_lock();
>  +	nc = __get_nfsdfs_client(inode);
>  +	rcu_read_unlock();
>  +	return nc;
>  +}
>  +/* from __rpc_unlink */
>  +static void nfsdfs_remove_file(struct inode *dir, struct dentry *dentry)
>  +{
>  +	int ret;
>  +
>  +	clear_ncl(d_inode(dentry));
>  +	dget(dentry);
>  +	ret = simple_unlink(dir, dentry);
>  +	d_delete(dentry);
>  +	dput(dentry);
>  +	WARN_ON_ONCE(ret);
>  +}
>  +
>  +static void nfsdfs_remove_files(struct dentry *root)
>  +{
>  +	struct dentry *dentry, *tmp;
>  +
>  +	list_for_each_entry_safe(dentry, tmp, &root->d_subdirs, d_child) {
>  +		if (!simple_positive(dentry)) {
>  +			WARN_ON_ONCE(1); /* I think this can't happen? */
>  +			continue;
>  +		}
>  +		nfsdfs_remove_file(d_inode(root), dentry);
>  +	}
>  +}
>  +
>  +/* XXX: cut'n'paste from simple_fill_super; figure out if we could share
>  + * code instead. */
>  +static  int nfsdfs_create_files(struct dentry *root,
>  +					const struct tree_descr *files)
>  +{
>  +	struct inode *dir = d_inode(root);
>  +	struct inode *inode;
>  +	struct dentry *dentry;
>  +	int i;
>  +
>  +	inode_lock(dir);
>  +	for (i = 0; files->name && files->name[0]; i++, files++) {
>  +		if (!files->name)
>  +			continue;
>  +		dentry = d_alloc_name(root, files->name);
>  +		if (!dentry)
>  +			goto out;
>  +		inode = nfsd_get_inode(d_inode(root)->i_sb,
>  +					S_IFREG | files->mode);
>  +		if (!inode) {
>  +			dput(dentry);
>  +			goto out;
>  +		}
>  +		inode->i_fop = files->ops;
>  +		inode->i_private = __get_nfsdfs_client(dir);
>  +		d_add(dentry, inode);
>  +		fsnotify_create(dir, dentry);
>  +	}
>  +	inode_unlock(dir);
>  +	return 0;
>  +out:
>  +	nfsdfs_remove_files(root);
>  +	inode_unlock(dir);
>  +	return -ENOMEM;
>  +}
>  +
>  +/* on success, returns positive number unique to that client. */
>  +struct dentry *nfsd_client_mkdir(struct nfsd_net *nn,
>  +		struct nfsdfs_client *ncl, u32 id,
>  +		const struct tree_descr *files)
>  +{
>  +	struct dentry *dentry;
>  +	char name[11];
>  +	int ret;
>  +
>  +	sprintf(name, "%u", id);
>  +
>  +	dentry = nfsd_mkdir(nn->nfsd_client_dir, ncl, name);
>  +	if (IS_ERR(dentry)) /* XXX: tossing errors? */
>  +		return NULL;
>  +	ret = nfsdfs_create_files(dentry, files);
>  +	if (ret) {
>  +		nfsd_client_rmdir(dentry);
>  +		return NULL;
>  +	}
>  +	return dentry;
>  +}
>  +
>  +/* Taken from __rpc_rmdir: */
>  +void nfsd_client_rmdir(struct dentry *dentry)
>  +{
>  +	struct inode *dir = d_inode(dentry->d_parent);
>  +	struct inode *inode = d_inode(dentry);
>  +	int ret;
>  +
>  +	inode_lock(dir);
>  +	nfsdfs_remove_files(dentry);
>  +	clear_ncl(inode);
>  +	dget(dentry);
>  +	ret = simple_rmdir(dir, dentry);
>  +	WARN_ON_ONCE(ret);
>  +	d_delete(dentry);
>  +	inode_unlock(dir);
>  +}
>  +
> - static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
> + static int nfsd_fill_super(struct super_block *sb, struct fs_context *fc)
>   {
>  +	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
>  +							nfsd_net_id);
>  +	struct dentry *dentry;
>  +	int ret;
>  +
>   	static const struct tree_descr nfsd_files[] = {
>   		[NFSD_List] = {"exports", &exports_nfsd_operations, S_IRUGO},
>   		[NFSD_Export_features] = {"export_features",
> @@@ -1372,23 -1178,33 +1373,39 @@@
>   #endif
>   		/* last one */ {""}
>   	};
> - 	get_net(sb->s_fs_info);
>  -
>  -	return simple_fill_super(sb, 0x6e667364, nfsd_files);
>  +	ret = simple_fill_super(sb, 0x6e667364, nfsd_files);
>  +	if (ret)
>  +		return ret;
>  +	dentry = nfsd_mkdir(sb->s_root, NULL, "clients");
>  +	if (IS_ERR(dentry))
>  +		return PTR_ERR(dentry);
>  +	nn->nfsd_client_dir = dentry;
>  +	return 0;
> + }
> + 
> + static int nfsd_fs_get_tree(struct fs_context *fc)
> + {
> + 	fc->s_fs_info = get_net(fc->net_ns);
> + 	return vfs_get_super(fc, vfs_get_keyed_super, nfsd_fill_super);
> + }
>   
> + static void nfsd_fs_free_fc(struct fs_context *fc)
> + {
> + 	if (fc->s_fs_info)
> + 		put_net(fc->s_fs_info);
>   }
>   
> - static struct dentry *nfsd_mount(struct file_system_type *fs_type,
> - 	int flags, const char *dev_name, void *data)
> + static const struct fs_context_operations nfsd_fs_context_ops = {
> + 	.free		= nfsd_fs_free_fc,
> + 	.get_tree	= nfsd_fs_get_tree,
> + };
> + 
> + static int nfsd_init_fs_context(struct fs_context *fc)
>   {
> - 	struct net *net = current->nsproxy->net_ns;
> - 	return mount_ns(fs_type, flags, data, net, net->user_ns, nfsd_fill_super);
> + 	put_user_ns(fc->user_ns);
> + 	fc->user_ns = get_user_ns(fc->net_ns->user_ns);
> + 	fc->ops = &nfsd_fs_context_ops;
> + 	return 0;
>   }
>   
>   static void nfsd_umount(struct super_block *sb)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the vfs tree with the nfsd tree
  2019-07-08 12:45 ` J. Bruce Fields
@ 2019-07-08 14:15   ` Stephen Rothwell
  2019-07-09  2:36     ` J. Bruce Fields
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2019-07-08 14:15 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: Al Viro, Linux Next Mailing List, Linux Kernel Mailing List,
	David Howells

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

Hi,

On Mon, 8 Jul 2019 08:45:10 -0400 "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> I did a fetch of
> 
> 	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> 
> and looked at the "master" branch and couldn't find that vfs commit.  Am
> I looking in the wrong place?

Maybe you were just a little early, I only finished linux-next today a
few minutes before you sent this email.

> (I'm sure your resolution is fine, I just thought to be careful it might
> be nice to run some tests on the merge.)

Thanks.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the vfs tree with the nfsd tree
  2019-07-08 14:15   ` Stephen Rothwell
@ 2019-07-09  2:36     ` J. Bruce Fields
  0 siblings, 0 replies; 5+ messages in thread
From: J. Bruce Fields @ 2019-07-09  2:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Al Viro, Linux Next Mailing List, Linux Kernel Mailing List,
	David Howells

On Tue, Jul 09, 2019 at 12:15:31AM +1000, Stephen Rothwell wrote:
> Hi,
> 
> On Mon, 8 Jul 2019 08:45:10 -0400 "J. Bruce Fields" <bfields@fieldses.org> wrote:
> >
> > I did a fetch of
> > 
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > 
> > and looked at the "master" branch and couldn't find that vfs commit.  Am
> > I looking in the wrong place?
> 
> Maybe you were just a little early, I only finished linux-next today a
> few minutes before you sent this email.

Indeed, I see the merge now (ecd27e0ab735: Merge remote-tracking branch
'vfs/for-next').  Thanks!

--b.

> 
> > (I'm sure your resolution is fine, I just thought to be careful it might
> > be nice to run some tests on the merge.)
> 
> Thanks.
> 
> -- 
> Cheers,
> Stephen Rothwell



^ permalink raw reply	[flat|nested] 5+ messages in thread

* linux-next: manual merge of the vfs tree with the nfsd tree
@ 2018-10-29  1:21 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2018-10-29  1:21 UTC (permalink / raw)
  To: Al Viro, J. Bruce Fields
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	David Howells, Trond Myklebust

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

Hi Al,

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

  net/sunrpc/svcsock.c

between commit:

  64dbf4dc5496 ("SUNRPC: Simplify TCP receive code")

from the nfsd tree and commit:

  aa563d7bca6e ("iov_iter: Separate type from direction and use accessor functions")

from the vfs 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/svcsock.c
index 3b525accaa68,0b46ec0bf74e..000000000000
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@@ -336,12 -338,8 +336,12 @@@ static ssize_t svc_recvfrom(struct svc_
  	rqstp->rq_xprt_hlen = 0;
  
  	clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
- 	iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, iov, nr, buflen);
+ 	iov_iter_kvec(&msg.msg_iter, READ, iov, nr, buflen);
 -	len = sock_recvmsg(svsk->sk_sock, &msg, msg.msg_flags);
 +	if (base != 0) {
 +		iov_iter_advance(&msg.msg_iter, base);
 +		buflen -= base;
 +	}
 +	len = sock_recvmsg(svsk->sk_sock, &msg, MSG_DONTWAIT);
  	/* If we read a full record, then assume there may be more
  	 * data to read (stream based sockets only!)
  	 */

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-09  2:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08  1:06 linux-next: manual merge of the vfs tree with the nfsd tree Stephen Rothwell
2019-07-08 12:45 ` J. Bruce Fields
2019-07-08 14:15   ` Stephen Rothwell
2019-07-09  2:36     ` J. Bruce Fields
  -- strict thread matches above, loose matches on Subject: below --
2018-10-29  1:21 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).