Re: [PATCH] 2.4.27 fs/open.c code small cleanup

From: Willy Tarreau
Date: Fri Aug 13 2004 - 00:21:41 EST


Hi,

On Fri, Aug 13, 2004 at 05:49:40AM -0000, Nikolay wrote:
> A little clean up, soon I'll send few bug fixes and cleanups.

I don't know for others, but I find it preferable not to change these
core files for such trivial cleanups. It will not change the output code
nor will make the source much more readable, but may break some external
useful patches. There are patches such as vserver and grsecurity which
touch open.c, and there are certainly others.

BTW, I noticed that credits are by far the most important part of this patch...

Regards,
Willy

> diff -u linux-2.4.27/MAINTAINERS linux-2.4.27/MAINTAINERS
> --- linux-2.4.27/MAINTAINERS 2004-08-09 02:48:53.000000000 +0300
> +++ linux-2.4.27/MAINTAINERS 2004-08-09 02:51:04.000000000 +0300
> @@ -1806,6 +1806,12 @@
> L: linux-video@xxxxxxxxxxxxxxxxxxxxxxxx
> S: Maintained
>
> +SYS_FSTATFS CODE CLEANUP
> +P: Nikolay Alexandrov
> +M: Nikolay@xxxxxxxxxxxxx
> +W: http://kstats.blackwall.org
> +S: Maintained
> +
> SYSV FILESYSTEM
> P: Christoph Hellwig
> M: hch@xxxxxxxxxxxxx
> diff -u linux-2.4.27/fs/open.c linux-2.4.27/fs/open.c
> --- linux-2.4.27/fs/open.c 2004-08-09 02:22:58.000000000 +0300
> +++ linux-2.4.27/fs/open.c 2004-08-09 02:24:48.000000000 +0300
> @@ -2,6 +2,7 @@
> * linux/fs/open.c
> *
> * Copyright (C) 1991, 1992 Linus Torvalds
> + * 08.08.2004 - vfs_fstatfs code cleanup -- Nikolay Alexandrov (Nikolay@xxxxxxxxxxxxx)
> */
>
> #include <linux/string.h>
> @@ -62,12 +63,11 @@
> error = -EBADF;
> file = fget(fd);
> if (!file)
> - goto out;
> + return error;
> error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
> if (!error && copy_to_user(buf, &tmp, sizeof(struct statfs)))
> error = -EFAULT;
> fput(file);
> -out:
> return error;
> }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/