[PATCH] 2.3.26 ioctl EXT2_IOC_GETFLAGS returns useless bits

kumon@flab.fujitsu.co.jp
Mon, 8 Nov 1999 17:18:38 +0900


I hope the following patch will be included in 2.3.27.

In 2.3.26 ioctl.c was not updated.

kumon@flab.fujitsu.co.jp writes:
> Hi,
>
> The code for ioctl EXT2_IOC_GETFLAGS forgets to return the masked out
> value.
>
>
> diff -ruN linux-2.3.25/fs/ext2/ioctl.c linux-2.3.25-new/fs/ext2/ioctl.c
> --- linux-2.3.25/fs/ext2/ioctl.c Thu Oct 28 22:23:10 1999
> +++ linux-2.3.25-new/fs/ext2/ioctl.c Thu Nov 4 19:31:44 1999
> @@ -23,7 +23,7 @@
> switch (cmd) {
> case EXT2_IOC_GETFLAGS:
> flags = inode->u.ext2_i.i_flags & EXT2_FL_USER_VISIBLE;
> - return put_user(inode->u.ext2_i.i_flags, (int *) arg);
> + return put_user(flags, (int *) arg);
> case EXT2_IOC_SETFLAGS: {
> unsigned int oldflags;
>

--
Computer Systems Laboratory, Fujitsu Labs.
kumon@flab.fujitsu.co.jp

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/