Re: [PATCH] Change for codestyle and good read
From: Joe Perches
Date: Wed Oct 15 2014 - 19:26:53 EST
On Wed, 2014-10-15 at 20:15 -0300, Albino Biasutti Neto wrote:
> ---
Are you not mentioning the logic changes because you
didn't notice them?
> diff --git a/fs/open.c b/fs/open.c
[]
> @@ -71,10 +71,8 @@ long vfs_truncate(struct path *path, loff_t length)
> inode = path->dentry->d_inode;
>
> /* For directories it's -EISDIR, for other non-regulars - -EINVAL */
> - if (S_ISDIR(inode->i_mode))
> + if ((S_ISDIR(inode->i_mode)) && (!S_ISRG(inode->i_mode)))
> return -EISDIR;
> - if (!S_ISREG(inode->i_mode))
> - return -EINVAL;
Don't think so...
Did you read the comment?
> @@ -137,14 +135,13 @@ retry:
> return error;
> }
>
> -SYSCALL_DEFINE2(truncate, const char __user *, path, long, length)
> -{
> +SYSCALL_DEFINE2(truncate, const char __user *, path, long, length) {
> return do_sys_truncate(path, length);
> }
Poorer, non-kernel style
[]
diff --git a/kernel/exit.c b/kernel/exit.c
> index 32c58f7..f429fdd 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -78,8 +78,8 @@ static void __unhash_process(struct task_struct *p, bool group_dead)
> }
>
> /*
> - * This function expects the tasklist_lock write-locked.
> - */
> + * This function expects the tasklist_lock write-locked.
> +*/
> static void __exit_signal(struct task_struct *tsk)
> {
> struct signal_struct *sig = tsk->signal;
Adding trailing whitespace and misaligning too.
--
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/