aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/inode.c
diff options
context:
space:
mode:
authorVyacheslav Dubeyko <slava@dubeyko.com>2013-04-30 18:27:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:05 -0400
commiteb53b6db7a53642b80b0ca4885cb91d5c7dbc0f8 (patch)
tree172238481b52168e21aab3fb41ba31226ff2b850 /fs/nilfs2/inode.c
parentdc33f5f3c9988026aad5b788c761c8c1b363e919 (diff)
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 <dan.carpenter@oracle.com> Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/inode.c')
-rw-r--r--fs/nilfs2/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index ba7a1da7634b..cf02f5530713 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)
192 struct inode *inode = page->mapping->host; 192 struct inode *inode = page->mapping->host;
193 int err; 193 int err;
194 194
195 if (inode && (inode->i_sb->s_flags & MS_RDONLY)) { 195 if (inode->i_sb->s_flags & MS_RDONLY) {
196 /* 196 /*
197 * It means that filesystem was remounted in read-only 197 * It means that filesystem was remounted in read-only
198 * mode because of error or metadata corruption. But we 198 * mode because of error or metadata corruption. But we