2006-10-04 16:23:25

by Eric Sesterhenn

[permalink] [raw]
Subject: [Patch] Remove unnecessary check in fs/fat/inode.c

hi,

since all callers dereference sb, and this function
does so earlier too, we dont need the check.

Signed-off-by: Eric Sesterhenn <[email protected]>

--- linux-2.6.18-git21/fs/fat/inode.c.orig 2006-10-04 18:21:03.000000000 +0200
+++ linux-2.6.18-git21/fs/fat/inode.c 2006-10-04 18:21:22.000000000 +0200
@@ -1472,7 +1472,7 @@ int fat_flush_inodes(struct super_block
ret = writeback_inode(i1);
if (!ret && i2)
ret = writeback_inode(i2);
- if (!ret && sb) {
+ if (!ret) {
struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
ret = filemap_flush(mapping);
}



2006-10-04 16:36:39

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: [Patch] Remove unnecessary check in fs/fat/inode.c

Eric Sesterhenn <[email protected]> writes:

> since all callers dereference sb, and this function
> does so earlier too, we dont need the check.
>
> Signed-off-by: Eric Sesterhenn <[email protected]>
>
> --- linux-2.6.18-git21/fs/fat/inode.c.orig 2006-10-04 18:21:03.000000000 +0200
> +++ linux-2.6.18-git21/fs/fat/inode.c 2006-10-04 18:21:22.000000000 +0200
> @@ -1472,7 +1472,7 @@ int fat_flush_inodes(struct super_block
> ret = writeback_inode(i1);
> if (!ret && i2)
> ret = writeback_inode(i2);
> - if (!ret && sb) {
> + if (!ret) {
> struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
> ret = filemap_flush(mapping);
> }

Acked-by: OGAWA Hirofumi <[email protected]>

Thanks.
--
OGAWA Hirofumi <[email protected]>