lkml.org 
[lkml]   [2014]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Change for codestyle and good read
From
Date
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.



\
 
 \ /
  Last update: 2014-10-16 01:41    [W:1.341 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site