aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index ea3cb29018e9..6b328de41728 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -259,8 +259,17 @@ repeat:
259 if (PageUptodate(page)) 259 if (PageUptodate(page))
260 return page; 260 return page;
261 261
262 BUG_ON(dn.data_blkaddr == NEW_ADDR); 262 /*
263 BUG_ON(dn.data_blkaddr == NULL_ADDR); 263 * A new dentry page is allocated but not able to be written, since its
264 * new inode page couldn't be allocated due to -ENOSPC.
265 * In such the case, its blkaddr can be remained as NEW_ADDR.
266 * see, f2fs_add_link -> get_new_data_page -> init_inode_metadata.
267 */
268 if (dn.data_blkaddr == NEW_ADDR) {
269 zero_user_segment(page, 0, PAGE_CACHE_SIZE);
270 SetPageUptodate(page);
271 return page;
272 }
264 273
265 err = f2fs_readpage(sbi, page, dn.data_blkaddr, READ_SYNC); 274 err = f2fs_readpage(sbi, page, dn.data_blkaddr, READ_SYNC);
266 if (err) 275 if (err)