Re: [PATCH] ext4: ioctl: fix erroneous return value

2016-02-11 Thread Theodore Ts'o
On Thu, Feb 11, 2016 at 10:58:58AM -0500, Anton Protopopov wrote: > The ext4_ioctl_setflags() function which is used in the ioctls > EXT4_IOC_SETFLAGS and EXT4_IOC_FSSETXATTR may return the positive value > EPERM instead of -EPERM in case of error. This bug was introduced by a > recent commit 9b736

[PATCH] ext4: ioctl: fix erroneous return value

2016-02-11 Thread Anton Protopopov
The ext4_ioctl_setflags() function which is used in the ioctls EXT4_IOC_SETFLAGS and EXT4_IOC_FSSETXATTR may return the positive value EPERM instead of -EPERM in case of error. This bug was introduced by a recent commit 9b7365fc. The following program can be used to illustrate the wrong behavior: