summaryrefslogtreecommitdiff
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-02-05 09:46:29 (GMT)
committerJaegeuk Kim <jaegeuk@kernel.org>2015-03-03 17:58:45 (GMT)
commit0c872e2dedfc09f41a5604d1c5010f800c0bd8f1 (patch)
tree2bc29f27414dc9048b1f1e6b3b88d9571ff9726d /fs/f2fs/data.c
parent3c0d84d6f1dde0a85f20957954fffb209edc55ac (diff)
downloadlinux-0c872e2dedfc09f41a5604d1c5010f800c0bd8f1.tar.xz
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 985ed02..0811d65 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,
if (is_inode_flag_set(fi, FI_NO_EXTENT))
return 0;
- read_lock(&fi->ext.ext_lock);
+ read_lock(&fi->ext_lock);
if (fi->ext.len == 0) {
- read_unlock(&fi->ext.ext_lock);
+ read_unlock(&fi->ext_lock);
return 0;
}
@@ -284,10 +284,10 @@ static int check_extent_cache(struct inode *inode, pgoff_t pgofs,
bh_result->b_size = UINT_MAX;
stat_inc_read_hit(inode->i_sb);
- read_unlock(&fi->ext.ext_lock);
+ read_unlock(&fi->ext_lock);
return 1;
}
- read_unlock(&fi->ext.ext_lock);
+ read_unlock(&fi->ext_lock);
return 0;
}
@@ -309,7 +309,7 @@ void update_extent_cache(struct dnode_of_data *dn)
fofs = start_bidx_of_node(ofs_of_node(dn->node_page), fi) +
dn->ofs_in_node;
- write_lock(&fi->ext.ext_lock);
+ write_lock(&fi->ext_lock);
start_fofs = fi->ext.fofs;
end_fofs = fi->ext.fofs + fi->ext.len - 1;
@@ -366,7 +366,7 @@ void update_extent_cache(struct dnode_of_data *dn)
need_update = true;
}
end_update:
- write_unlock(&fi->ext.ext_lock);
+ write_unlock(&fi->ext_lock);
if (need_update)
sync_inode_page(dn);
return;