From: Vyacheslav Dubeyko Date: Tue, 30 Apr 2013 22:27:51 +0000 (-0700) Subject: nilfs2: remove unneeded test in nilfs_writepage() X-Git-Tag: v3.10-rc1~143^2~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb53b6db7a53642b80b0ca4885cb91d5c7dbc0f8;p=platform%2Fkernel%2Flinux-stable.git nilfs2: remove unneeded test in nilfs_writepage() page->mapping->host cannot be NULL in nilfs_writepage(), so remove the unneeded test. The fixes the smatch warning: "fs/nilfs2/inode.c:211 nilfs_writepage() error: we previously assumed 'inode' could be null (see line 195)". Reported-by: Dan Carpenter Signed-off-by: Vyacheslav Dubeyko Cc: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index ba7a1da..cf02f55 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -192,7 +192,7 @@ static int nilfs_writepage(struct page *page, struct writeback_control *wbc) struct inode *inode = page->mapping->host; int err; - if (inode && (inode->i_sb->s_flags & MS_RDONLY)) { + if (inode->i_sb->s_flags & MS_RDONLY) { /* * It means that filesystem was remounted in read-only * mode because of error or metadata corruption. But we