From de9665f21b95b1899081aebe3ff5eaf7be8c2ac7 Mon Sep 17 00:00:00 2001 From: Evgeniy Polyakov Date: Tue, 6 Mar 2012 14:24:21 +0400 Subject: [PATCH] Print readpage() error only when there is error --- fs/pohmelfs/inode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/pohmelfs/inode.c b/fs/pohmelfs/inode.c index 9d3025d688f..fdb39a7954d 100644 --- a/fs/pohmelfs/inode.c +++ b/fs/pohmelfs/inode.c @@ -605,15 +605,16 @@ static int pohmelfs_readpage(struct file *file, struct page *page) page_cache_get(page); err = pohmelfs_readpages_send(pi, rp); - pr_err("pohmelfs: %s: readpage: ino: %lu, offset: %lu, uptodate: %d, err: %d\n", - pohmelfs_dump_id(pi->id.id), inode->i_ino, (long)page_offset(page), - PageUptodate(page), err); - if (err >= 0) err = 0; kref_put(&rp->refcnt, pohmelfs_readpages_free); err_out_exit: + if (err < 0) + pr_err("pohmelfs: %s: readpage: ino: %lu, offset: %lu, uptodate: %d, err: %d\n", + pohmelfs_dump_id(pi->id.id), inode->i_ino, (long)page_offset(page), + PageUptodate(page), err); + return err; } -- 2.11.4.GIT