lkml.org 
[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Jfs-discussion] [PATCH 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS
On Tue, Jun 11, 2019 at 08:41:06AM -0500, Dave Kleikamp wrote:
> On 6/10/19 11:45 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Create a generic checking function for the incoming FS_IOC_SETFLAGS flag
> > values so that we can standardize the implementations that follow ext4's
> > flag values.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> -- clip --
>
> > diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c
> > index ba34dae8bd9f..c8446d2cd0c7 100644
> > --- a/fs/jfs/ioctl.c
> > +++ b/fs/jfs/ioctl.c
> > @@ -98,6 +98,12 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> > /* Lock against other parallel changes of flags */
> > inode_lock(inode);
> >
> > + oldflags = jfs_map_ext2(jfs_inode->mode2 & JFS_FL_USER_VISIBLE,
> > + 0);
> > + err = vfs_ioc_setflags_check(inode, oldflags, flags);
> > + if (err)
> > + goto setflags_out;
>
> inode_unlock(inode) is not called on the error path.
>
> > +
> > oldflags = jfs_inode->mode2;
> >
> > /*
>
> This patch leaves jfs's open-coded version of the same check.

Heh, thanks for pointing that out. I'll fix both of those things.

--D

> Thanks,
> Shaggy

\
 
 \ /
  Last update: 2019-06-12 02:36    [W:0.061 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site