diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-02-05 04:46:29 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-03-03 12:58:45 -0500 |
commit | 0c872e2dedfc09f41a5604d1c5010f800c0bd8f1 (patch) | |
tree | 2bc29f27414dc9048b1f1e6b3b88d9571ff9726d /fs/f2fs/data.c | |
parent | 3c0d84d6f1dde0a85f20957954fffb209edc55ac (diff) |
f2fs: move ext_lock out of struct extent_info
Move ext_lock out of struct extent_info, then in the following patches we can
use variables with struct extent_info type as a parameter to pass pure data.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 985ed023a750..0811d6509fce 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -258,9 +258,9 @@ static int check_extent_cache(struct inode *inode, pgoff_t pgofs, | |||
258 | if (is_inode_flag_set(fi, FI_NO_EXTENT)) | 258 | if (is_inode_flag_set(fi, FI_NO_EXTENT)) |
259 | return 0; | 259 | return 0; |
260 | 260 | ||
261 | read_lock(&fi->ext.ext_lock); | 261 | read_lock(&fi->ext_lock); |
262 | if (fi->ext.len == 0) { | 262 | if (fi->ext.len == 0) { |
263 | read_unlock(&fi->ext.ext_lock); | 263 | read_unlock(&fi->ext_lock); |
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
@@ -284,10 +284,10 @@ static int check_extent_cache(struct inode *inode, pgoff_t pgofs, | |||
284 | bh_result->b_size = UINT_MAX; | 284 | bh_result->b_size = UINT_MAX; |
285 | 285 | ||
286 | stat_inc_read_hit(inode->i_sb); | 286 | stat_inc_read_hit(inode->i_sb); |
287 | read_unlock(&fi->ext.ext_lock); | 287 | read_unlock(&fi->ext_lock); |
288 | return 1; | 288 | return 1; |
289 | } | 289 | } |
290 | read_unlock(&fi->ext.ext_lock); | 290 | read_unlock(&fi->ext_lock); |
291 | return 0; | 291 | return 0; |
292 | } | 292 | } |
293 | 293 | ||
@@ -309,7 +309,7 @@ void update_extent_cache(struct dnode_of_data *dn) | |||
309 | fofs = start_bidx_of_node(ofs_of_node(dn->node_page), fi) + | 309 | fofs = start_bidx_of_node(ofs_of_node(dn->node_page), fi) + |
310 | dn->ofs_in_node; | 310 | dn->ofs_in_node; |
311 | 311 | ||
312 | write_lock(&fi->ext.ext_lock); | 312 | write_lock(&fi->ext_lock); |
313 | 313 | ||
314 | start_fofs = fi->ext.fofs; | 314 | start_fofs = fi->ext.fofs; |
315 | end_fofs = fi->ext.fofs + fi->ext.len - 1; | 315 | end_fofs = fi->ext.fofs + fi->ext.len - 1; |
@@ -366,7 +366,7 @@ void update_extent_cache(struct dnode_of_data *dn) | |||
366 | need_update = true; | 366 | need_update = true; |
367 | } | 367 | } |
368 | end_update: | 368 | end_update: |
369 | write_unlock(&fi->ext.ext_lock); | 369 | write_unlock(&fi->ext_lock); |
370 | if (need_update) | 370 | if (need_update) |
371 | sync_inode_page(dn); | 371 | sync_inode_page(dn); |
372 | return; | 372 | return; |