On Thu, Feb 24, 2011 at 05:38:16PM +0800, liubo wrote: > > setflags ioctl should return error when any checks fail. > > Signed-off-by: Liu Bo <liubo2...@cn.fujitsu.com> > --- > fs/btrfs/ioctl.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c > index 02d224e..e397da4 100644 > --- a/fs/btrfs/ioctl.c > +++ b/fs/btrfs/ioctl.c > @@ -213,9 +213,11 @@ static int btrfs_ioctl_setflags(struct file *file, void > __user *arg) > btrfs_end_transaction(trans, root); > > mnt_drop_write(file->f_path.mnt); > + > + ret = 0;
Technically speaking, this assignment is not necessary as any non-zero value is caught above as a BUG_ON, but assigning it to zero definetely helps readability. > out_unlock: > mutex_unlock(&inode->i_mutex); > - return 0; > + return ret; Good cacth. Reviewed-by: David Sterba <dste...@suse.cz> > } > > static int btrfs_ioctl_getversion(struct file *file, int __user *arg) > -- -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html