Skip to content

Commit

Permalink
ceph: remove unnecessary NULL check
Browse files Browse the repository at this point in the history
If page->mapping is NULL, releasepage() callback does not get called.
Remove the unnecessary NULL check to make static code analysis tool
happy

Signed-off-by: Yan, Zheng <zyan@redhat.com>
  • Loading branch information
ukernel authored and idryomov committed Mar 25, 2016
1 parent a3d714c commit 4531126
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,

static int ceph_releasepage(struct page *page, gfp_t g)
{
struct inode *inode = page->mapping ? page->mapping->host : NULL;
dout("%p releasepage %p idx %lu\n", inode, page, page->index);
dout("%p releasepage %p idx %lu\n", page->mapping->host,
page, page->index);
WARN_ON(PageDirty(page));

/* Can we release the page from the cache? */
Expand Down

0 comments on commit 4531126

Please sign in to comment.