文章归档

what is the real necessary change

看内核patchs的时候,经常会看到一些清理代码的patch,理由是unnecessary,比如这个:

[PATCH] vfs: no need to check about IS_IMMUTABLE in do_fallocate

From: Ashish Sangwan <a.sangwan <at> samsung.com> In do_fallocate, first there is check for FMODE_WRITE and after that there is second check for IS_IMMUTABLE. A file cannot be opened in write mode if the corresponding inode is immutable, hence the second check is not required. Signed-off-by: Ashish Sangwan <a.sangwan <at> samsung.com> Signed-off-by: Namjae Jeon <namjae.jeon <at> samsung.com> --- fs/open.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/open.c b/fs/open.c index 8c74100..939e402 100644 --- a/fs/open.c +++ b/fs/open.c <at> <at> -245,9 +245,6 <at> <at> int do_fallocate(struct

»» 继续阅读全文