[<prev] [next>] [day] [month] [year] [list]
Message-ID: <52A84C8E.5090209@gmail.com>
Date: Wed, 11 Dec 2013 19:29:18 +0800
From: Younger Liu <younger.liucn@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: joern@...fs.org, prasadjoshi.linux@...il.com, logfs@...fs.org,
kernel <linux-kernel@...r.kernel.org>,
fs-devel <linux-fsdevel@...r.kernel.org>, liuyiyang@...ense.com
Subject: [RESENT PATCH] logfs: Check for the return value after calling find_or_create_page()
From: Younger Liu <liuyiyang@...ense.com>
In get_mapping_page(), after calling find_or_create_page(),
the return value should be checked.
This patch has been provided:
http://www.spinics.net/lists/linux-fsdevel/msg66948.html
but not been applied now.
Signed-off-by: Younger Liu <liuyiyang@...ense.com>
Cc: Younger Liu <younger.liucn@...il.com>
Cc: Vyacheslav Dubeyko <slava@...eyko.com>
Reviewed-by: Prasad Joshi <prasadjoshi.linux@...il.com>
---
fs/logfs/segment.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
index d448a77..7f9b096 100644
--- a/fs/logfs/segment.c
+++ b/fs/logfs/segment.c
@@ -62,7 +62,8 @@ static struct page *get_mapping_page(struct
super_block *sb, pgoff_t index,
page = read_cache_page(mapping, index, filler, sb);
else {
page = find_or_create_page(mapping, index, GFP_NOFS);
- unlock_page(page);
+ if (page)
+ unlock_page(page);
}
return page;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists