linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
To: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 10/11] userns: Convert the udf filesystem to use kuid/kgid where appropriate
Date: Mon, 24 Sep 2012 07:24:42 +0200	[thread overview]
Message-ID: <20120924052442.GA12264@quack.suse.cz> (raw)
In-Reply-To: <1348277712-30055-10-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>

On Fri 21-09-12 18:35:11, Eric W. Biederman wrote:
> From: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
> 
> Cc: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
> Acked-by: Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> Signed-off-by: Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
  The patch looks good. You can add:
Acked-by: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>

							Honza
> ---
>  fs/udf/inode.c |   20 ++++++++++++--------
>  init/Kconfig   |    1 -
>  2 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index fafaad7..2e6fb4d 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -1250,6 +1250,8 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
>  	struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
>  	struct udf_inode_info *iinfo = UDF_I(inode);
>  	unsigned int link_count;
> +	uid_t i_uid;
> +	gid_t i_gid;
>  
>  	fe = (struct fileEntry *)bh->b_data;
>  	efe = (struct extendedFileEntry *)bh->b_data;
> @@ -1309,17 +1311,19 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
>  	}
>  
>  	read_lock(&sbi->s_cred_lock);
> -	inode->i_uid = le32_to_cpu(fe->uid);
> -	if (inode->i_uid == -1 ||
> +	i_uid = le32_to_cpu(fe->uid);
> +	if (i_uid == -1 ||
>  	    UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_IGNORE) ||
>  	    UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_SET))
> -		inode->i_uid = UDF_SB(inode->i_sb)->s_uid;
> +		i_uid = UDF_SB(inode->i_sb)->s_uid;
> +	i_uid_write(inode, i_uid);
>  
> -	inode->i_gid = le32_to_cpu(fe->gid);
> -	if (inode->i_gid == -1 ||
> +	i_gid = le32_to_cpu(fe->gid);
> +	if (i_gid == -1 ||
>  	    UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_IGNORE) ||
>  	    UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_SET))
> -		inode->i_gid = UDF_SB(inode->i_sb)->s_gid;
> +		i_gid = UDF_SB(inode->i_sb)->s_gid;
> +	i_gid_write(inode, i_gid);
>  
>  	if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY &&
>  			sbi->s_fmode != UDF_INVALID_MODE)
> @@ -1539,12 +1543,12 @@ static int udf_update_inode(struct inode *inode, int do_sync)
>  	if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET))
>  		fe->uid = cpu_to_le32(-1);
>  	else
> -		fe->uid = cpu_to_le32(inode->i_uid);
> +		fe->uid = cpu_to_le32(i_uid_read(inode));
>  
>  	if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_FORGET))
>  		fe->gid = cpu_to_le32(-1);
>  	else
> -		fe->gid = cpu_to_le32(inode->i_gid);
> +		fe->gid = cpu_to_le32(i_gid_read(inode));
>  
>  	udfperms = ((inode->i_mode & S_IRWXO)) |
>  		   ((inode->i_mode & S_IRWXG) << 2) |
> diff --git a/init/Kconfig b/init/Kconfig
> index 21adc1c..6f9819a 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -939,7 +939,6 @@ config UIDGID_CONVERTED
>  	depends on NFSD = n
>  	depends on NFS_FS = n
>  	depends on OCFS2_FS = n
> -	depends on UDF_FS = n
>  	depends on UFS_FS = n
>  	depends on XFS_FS = n
>  
> -- 
> 1.7.5.4
> 
-- 
Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
SUSE Labs, CR

  parent reply	other threads:[~2012-09-24  5:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22  1:31 [REVIEW][PATCH 00/11] userns: Simple filesystems conversions Eric W. Biederman
     [not found] ` <877grmj115.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-09-22  1:35   ` [PATCH 01/11] userns: Convert affs to use kuid/kgid wherwe appropriate Eric W. Biederman
     [not found]     ` <1348277712-30055-1-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-09-22  1:35       ` [PATCH 02/11] userns: Convert bfs to use kuid/kgid where appropriate Eric W. Biederman
2012-09-22  1:35       ` [PATCH 03/11] userns: Convert btrfs " Eric W. Biederman
2012-09-22  1:35       ` [PATCH 04/11] userns: Convert hpfs to use kuid and kgid " Eric W. Biederman
2012-09-22  1:35       ` [PATCH 05/11] userns: Convert jffs2 " Eric W. Biederman
2012-09-22  1:35       ` [PATCH 06/11] userns: Convert jfs to use kuid/kgid " Eric W. Biederman
2012-09-22  1:35       ` [PATCH 07/11] userns: Convert reiserfs to use kuid and kgid " Eric W. Biederman
2012-09-22  1:35       ` [PATCH 08/11] userns: Convert squashfs to use kuid/kgid " Eric W. Biederman
2012-09-22  1:35       ` [PATCH 09/11] userns: Convert ubifs to use kuid/kgid Eric W. Biederman
2012-09-22  1:35       ` [PATCH 10/11] userns: Convert the udf filesystem to use kuid/kgid where appropriate Eric W. Biederman
     [not found]         ` <1348277712-30055-10-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-09-24  5:24           ` Jan Kara [this message]
2012-09-22  1:35       ` [PATCH 11/11] userns: Convert the ufs " Eric W. Biederman

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=20120924052442.GA12264@quack.suse.cz \
    --to=jack-alswssmvlrq@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).