Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-f2fs-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs

Pull f2fs fixes from Jaegeuk Kim:
"Fix a performance regression and a bug"

* tag 'for-f2fs-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
f2fs: fix wrong error hanlder in f2fs_follow_link
Revert "f2fs: enhance multi-threads performance"

+12 -5
+7
fs/f2fs/data.c
··· 1513 1513 { 1514 1514 struct inode *inode = mapping->host; 1515 1515 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); 1516 + bool locked = false; 1516 1517 int ret; 1517 1518 long diff; 1518 1519 ··· 1534 1533 1535 1534 diff = nr_pages_to_write(sbi, DATA, wbc); 1536 1535 1536 + if (!S_ISDIR(inode->i_mode)) { 1537 + mutex_lock(&sbi->writepages); 1538 + locked = true; 1539 + } 1537 1540 ret = write_cache_pages(mapping, wbc, __f2fs_writepage, mapping); 1541 + if (locked) 1542 + mutex_unlock(&sbi->writepages); 1538 1543 1539 1544 f2fs_submit_merged_bio(sbi, DATA, WRITE); 1540 1545
+1
fs/f2fs/f2fs.h
··· 625 625 struct mutex cp_mutex; /* checkpoint procedure lock */ 626 626 struct rw_semaphore cp_rwsem; /* blocking FS operations */ 627 627 struct rw_semaphore node_write; /* locking node writes */ 628 + struct mutex writepages; /* mutex for writepages() */ 628 629 wait_queue_head_t cp_wait; 629 630 630 631 struct inode_management im[MAX_INO_ENTRY]; /* manage inode cache */
+3 -5
fs/f2fs/namei.c
··· 298 298 299 299 static void *f2fs_follow_link(struct dentry *dentry, struct nameidata *nd) 300 300 { 301 - struct page *page; 301 + struct page *page = page_follow_link_light(dentry, nd); 302 302 303 - page = page_follow_link_light(dentry, nd); 304 - if (IS_ERR(page)) 303 + if (IS_ERR_OR_NULL(page)) 305 304 return page; 306 305 307 306 /* this is broken symlink case */ 308 307 if (*nd_get_link(nd) == 0) { 309 - kunmap(page); 310 - page_cache_release(page); 308 + page_put_link(dentry, nd, page); 311 309 return ERR_PTR(-ENOENT); 312 310 } 313 311 return page;
+1
fs/f2fs/super.c
··· 1035 1035 sbi->raw_super = raw_super; 1036 1036 sbi->raw_super_buf = raw_super_buf; 1037 1037 mutex_init(&sbi->gc_mutex); 1038 + mutex_init(&sbi->writepages); 1038 1039 mutex_init(&sbi->cp_mutex); 1039 1040 init_rwsem(&sbi->node_write); 1040 1041 clear_sbi_flag(sbi, SBI_POR_DOING);