diff options
author | piaojun <piaojun@huawei.com> | 2018-04-05 19:18:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-06 00:36:21 -0400 |
commit | d324cd4c80b9cbe1c2ac5285f071387c79bea455 (patch) | |
tree | 3afc8ff5164548c932618dff31fcf90df8774378 | |
parent | 1119d3c06f64a7123d774c363440987952c522ef (diff) |
ocfs2: use 'oi' instead of 'OCFS2_I()'
We could use 'oi' instead of 'OCFS2_I()' to make code more elegant.
Link: http://lkml.kernel.org/r/5A7020FE.5050906@huawei.com
Signed-off-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com>
Reviewed-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <ge.changwei@h3c.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ocfs2/alloc.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/aops.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/inode.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/refcounttree.c | 6 |
6 files changed, 12 insertions, 12 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 9a876bb07cac..0f157bbd3e0f 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -7119,7 +7119,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7119 | goto out_commit; | 7119 | goto out_commit; |
7120 | did_quota = 1; | 7120 | did_quota = 1; |
7121 | 7121 | ||
7122 | data_ac->ac_resv = &OCFS2_I(inode)->ip_la_data_resv; | 7122 | data_ac->ac_resv = &oi->ip_la_data_resv; |
7123 | 7123 | ||
7124 | ret = ocfs2_claim_clusters(handle, data_ac, 1, &bit_off, | 7124 | ret = ocfs2_claim_clusters(handle, data_ac, 1, &bit_off, |
7125 | &num); | 7125 | &num); |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 5ff960b7f078..302cd7caa4a7 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -346,7 +346,7 @@ static int ocfs2_readpage(struct file *file, struct page *page) | |||
346 | unlock = 0; | 346 | unlock = 0; |
347 | 347 | ||
348 | out_alloc: | 348 | out_alloc: |
349 | up_read(&OCFS2_I(inode)->ip_alloc_sem); | 349 | up_read(&oi->ip_alloc_sem); |
350 | out_inode_unlock: | 350 | out_inode_unlock: |
351 | ocfs2_inode_unlock(inode, 0); | 351 | ocfs2_inode_unlock(inode, 0); |
352 | out: | 352 | out: |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 9d8c3ee05c39..164fd0940af4 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -101,7 +101,7 @@ static int ocfs2_file_open(struct inode *inode, struct file *file) | |||
101 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 101 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
102 | 102 | ||
103 | trace_ocfs2_file_open(inode, file, file->f_path.dentry, | 103 | trace_ocfs2_file_open(inode, file, file->f_path.dentry, |
104 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | 104 | (unsigned long long)oi->ip_blkno, |
105 | file->f_path.dentry->d_name.len, | 105 | file->f_path.dentry->d_name.len, |
106 | file->f_path.dentry->d_name.name, mode); | 106 | file->f_path.dentry->d_name.name, mode); |
107 | 107 | ||
@@ -116,7 +116,7 @@ static int ocfs2_file_open(struct inode *inode, struct file *file) | |||
116 | /* Check that the inode hasn't been wiped from disk by another | 116 | /* Check that the inode hasn't been wiped from disk by another |
117 | * node. If it hasn't then we're safe as long as we hold the | 117 | * node. If it hasn't then we're safe as long as we hold the |
118 | * spin lock until our increment of open count. */ | 118 | * spin lock until our increment of open count. */ |
119 | if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) { | 119 | if (oi->ip_flags & OCFS2_INODE_DELETED) { |
120 | spin_unlock(&oi->ip_lock); | 120 | spin_unlock(&oi->ip_lock); |
121 | 121 | ||
122 | status = -ENOENT; | 122 | status = -ENOENT; |
@@ -190,7 +190,7 @@ static int ocfs2_sync_file(struct file *file, loff_t start, loff_t end, | |||
190 | bool needs_barrier = false; | 190 | bool needs_barrier = false; |
191 | 191 | ||
192 | trace_ocfs2_sync_file(inode, file, file->f_path.dentry, | 192 | trace_ocfs2_sync_file(inode, file, file->f_path.dentry, |
193 | OCFS2_I(inode)->ip_blkno, | 193 | oi->ip_blkno, |
194 | file->f_path.dentry->d_name.len, | 194 | file->f_path.dentry->d_name.len, |
195 | file->f_path.dentry->d_name.name, | 195 | file->f_path.dentry->d_name.name, |
196 | (unsigned long long)datasync); | 196 | (unsigned long long)datasync); |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 152f65b9c60e..ddc3e9470c87 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -1160,7 +1160,7 @@ static void ocfs2_clear_inode(struct inode *inode) | |||
1160 | * exception here are successfully wiped inodes - their | 1160 | * exception here are successfully wiped inodes - their |
1161 | * metadata can now be considered to be part of the system | 1161 | * metadata can now be considered to be part of the system |
1162 | * inodes from which it came. */ | 1162 | * inodes from which it came. */ |
1163 | if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED)) | 1163 | if (!(oi->ip_flags & OCFS2_INODE_DELETED)) |
1164 | ocfs2_checkpoint_inode(inode); | 1164 | ocfs2_checkpoint_inode(inode); |
1165 | 1165 | ||
1166 | mlog_bug_on_msg(!list_empty(&oi->ip_io_markers), | 1166 | mlog_bug_on_msg(!list_empty(&oi->ip_io_markers), |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index c801eddc4bf3..8dd6f703c819 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -525,7 +525,7 @@ static int __ocfs2_mknod_locked(struct inode *dir, | |||
525 | * these are used by the support functions here and in | 525 | * these are used by the support functions here and in |
526 | * callers. */ | 526 | * callers. */ |
527 | inode->i_ino = ino_from_blkno(osb->sb, fe_blkno); | 527 | inode->i_ino = ino_from_blkno(osb->sb, fe_blkno); |
528 | OCFS2_I(inode)->ip_blkno = fe_blkno; | 528 | oi->ip_blkno = fe_blkno; |
529 | spin_lock(&osb->osb_lock); | 529 | spin_lock(&osb->osb_lock); |
530 | inode->i_generation = osb->s_next_generation++; | 530 | inode->i_generation = osb->s_next_generation++; |
531 | spin_unlock(&osb->osb_lock); | 531 | spin_unlock(&osb->osb_lock); |
@@ -1186,8 +1186,8 @@ static int ocfs2_double_lock(struct ocfs2_super *osb, | |||
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | trace_ocfs2_double_lock_end( | 1188 | trace_ocfs2_double_lock_end( |
1189 | (unsigned long long)OCFS2_I(inode1)->ip_blkno, | 1189 | (unsigned long long)oi1->ip_blkno, |
1190 | (unsigned long long)OCFS2_I(inode2)->ip_blkno); | 1190 | (unsigned long long)oi2->ip_blkno); |
1191 | 1191 | ||
1192 | bail: | 1192 | bail: |
1193 | if (status) | 1193 | if (status) |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 323b162fb401..01c6b3894406 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -573,7 +573,7 @@ static int ocfs2_create_refcount_tree(struct inode *inode, | |||
573 | BUG_ON(ocfs2_is_refcount_inode(inode)); | 573 | BUG_ON(ocfs2_is_refcount_inode(inode)); |
574 | 574 | ||
575 | trace_ocfs2_create_refcount_tree( | 575 | trace_ocfs2_create_refcount_tree( |
576 | (unsigned long long)OCFS2_I(inode)->ip_blkno); | 576 | (unsigned long long)oi->ip_blkno); |
577 | 577 | ||
578 | ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &meta_ac); | 578 | ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &meta_ac); |
579 | if (ret) { | 579 | if (ret) { |
@@ -4766,8 +4766,8 @@ static int ocfs2_reflink_inodes_lock(struct inode *s_inode, | |||
4766 | *bh2 = *bh1; | 4766 | *bh2 = *bh1; |
4767 | 4767 | ||
4768 | trace_ocfs2_double_lock_end( | 4768 | trace_ocfs2_double_lock_end( |
4769 | (unsigned long long)OCFS2_I(inode1)->ip_blkno, | 4769 | (unsigned long long)oi1->ip_blkno, |
4770 | (unsigned long long)OCFS2_I(inode2)->ip_blkno); | 4770 | (unsigned long long)oi2->ip_blkno); |
4771 | 4771 | ||
4772 | return 0; | 4772 | return 0; |
4773 | 4773 | ||