diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-18 09:16:17 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-23 02:18:01 +0100 |
commit | 971767caf632190f77a40b4011c19948232eed75 (patch) | |
tree | 2a3eb454e7924271978932a81b825b1b0136db98 /fs/f2fs/data.c | |
parent | f2fs: clean up the do_submit_bio flow (diff) | |
download | linux-971767caf632190f77a40b4011c19948232eed75.tar.xz linux-971767caf632190f77a40b4011c19948232eed75.zip |
f2fs: use sbi->write_mutex for write bios
This patch removes an unnecessary semaphore (i.e., sbi->bio_sem).
There is no reason to use the semaphore when f2fs submits read and write IOs.
Instead, let's use a write mutex and cover the sbi->bio[] by the lock.
Change log from v1:
o split write_mutex suggested by Chao Yu
Chao described,
"All DATA/NODE/META bio buffers in superblock is protected by
'sbi->write_mutex', but each bio buffer area is independent, So we
should split write_mutex to three for DATA/NODE/META."
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 076a60cb8dbb..5920639ca377 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -383,8 +383,6 @@ int f2fs_readpage(struct f2fs_sb_info *sbi, struct page *page, trace_f2fs_readpage(page, blk_addr, type); - down_read(&sbi->bio_sem); - /* Allocate a new bio */ bio = f2fs_bio_alloc(bdev, 1); @@ -394,13 +392,11 @@ int f2fs_readpage(struct f2fs_sb_info *sbi, struct page *page, if (bio_add_page(bio, page, PAGE_CACHE_SIZE, 0) < PAGE_CACHE_SIZE) { bio_put(bio); - up_read(&sbi->bio_sem); f2fs_put_page(page, 1); return -EFAULT; } submit_bio(type, bio); - up_read(&sbi->bio_sem); return 0; } |