mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Cc: autofs@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@openvz.org, ldv@altlinux.org
Subject: Re: [RFC PATCH 1/2] autofs: set compat flag on sbi when daemon uses 32bit addressation
Date: Thu, 14 Sep 2017 08:38:02 +0800	[thread overview]
Message-ID: <e86c66c6-7430-00e2-518a-cb2b87ab4130@themaw.net> (raw)
In-Reply-To: <20170901112144.2669.1453.stgit@localhost.localdomain>

On 01/09/17 19:21, Stanislav Kinsburskiy wrote:
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
> ---
>  fs/autofs4/autofs_i.h  |    3 +++
>  fs/autofs4/dev-ioctl.c |    3 +++
>  fs/autofs4/inode.c     |    4 +++-
>  3 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
> index 4737615..3da105f 100644
> --- a/fs/autofs4/autofs_i.h
> +++ b/fs/autofs4/autofs_i.h
> @@ -120,6 +120,9 @@ struct autofs_sb_info {
>  	struct list_head active_list;
>  	struct list_head expiring_list;
>  	struct rcu_head rcu;
> +#ifdef CONFIG_COMPAT
> +	unsigned is32bit:1;
> +#endif
>  };
>  
>  static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb)
> diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
> index b7c816f..467d6c4 100644
> --- a/fs/autofs4/dev-ioctl.c
> +++ b/fs/autofs4/dev-ioctl.c
> @@ -397,6 +397,9 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
>  		sbi->pipefd = pipefd;
>  		sbi->pipe = pipe;
>  		sbi->catatonic = 0;
> +#ifdef CONFIG_COMPAT
> +		sbi->is32bit = is_compat_task();
> +#endif
>  	}
>  out:
>  	put_pid(new_pid);
> diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
> index 09e7d68..21d3c0b 100644
> --- a/fs/autofs4/inode.c
> +++ b/fs/autofs4/inode.c
> @@ -301,7 +301,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
>  	} else {
>  		sbi->oz_pgrp = get_task_pid(current, PIDTYPE_PGID);
>  	}
> -
> +#ifdef CONFIG_COMPAT
> +	sbi->is32bit = is_compat_task();
> +#endif
>  	if (autofs_type_trigger(sbi->type))
>  		__managed_dentry_set_managed(root);
>  
> 

Not sure about this.

Don't you think it would be better to avoid the in code #ifdefs by doing some
checks and defines in the header file and defining what's need to just use
is_compat_task().

Not sure 2 patches are needed for this either ......

Ian

  reply	other threads:[~2017-09-14  0:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 11:21 [RFC PATCH 0/2] autofs: fix autofs_v5_packet dlivery in compat mode Stanislav Kinsburskiy
2017-09-01 11:21 ` [RFC PATCH 1/2] autofs: set compat flag on sbi when daemon uses 32bit addressation Stanislav Kinsburskiy
2017-09-14  0:38   ` Ian Kent [this message]
2017-09-14  9:24     ` Stanislav Kinsburskiy
2017-09-14 11:29       ` Ian Kent
2017-09-14 11:39         ` Stanislav Kinsburskiy
2017-09-14 11:45           ` Ian Kent
2017-09-14 11:51             ` Stanislav Kinsburskiy
2017-09-01 11:21 ` [RFC PATCH 2/2] autofs: sent 32-bit sized packet for 32-bit process Stanislav Kinsburskiy
2017-09-14  0:32 ` [RFC PATCH 0/2] autofs: fix autofs_v5_packet dlivery in compat mode Ian Kent

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=e86c66c6-7430-00e2-518a-cb2b87ab4130@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=devel@openvz.org \
    --cc=ldv@altlinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skinsbursky@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®