@@ -2032,33 +2032,33 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
2032
2032
if (ret )
2033
2033
goto out ;
2034
2034
2035
- f2fs_down_write (& F2FS_I ( inode ) -> i_gc_rwsem [WRITE ]);
2035
+ f2fs_down_write (& fi -> i_gc_rwsem [WRITE ]);
2036
2036
2037
2037
/*
2038
2038
* Should wait end_io to count F2FS_WB_CP_DATA correctly by
2039
2039
* f2fs_is_atomic_file.
2040
2040
*/
2041
2041
if (get_dirty_pages (inode ))
2042
- f2fs_warn (F2FS_I_SB ( inode ) , "Unexpected flush for atomic writes: ino=%lu, npages=%u" ,
2042
+ f2fs_warn (sbi , "Unexpected flush for atomic writes: ino=%lu, npages=%u" ,
2043
2043
inode -> i_ino , get_dirty_pages (inode ));
2044
2044
ret = filemap_write_and_wait_range (inode -> i_mapping , 0 , LLONG_MAX );
2045
2045
if (ret ) {
2046
- f2fs_up_write (& F2FS_I ( inode ) -> i_gc_rwsem [WRITE ]);
2046
+ f2fs_up_write (& fi -> i_gc_rwsem [WRITE ]);
2047
2047
goto out ;
2048
2048
}
2049
2049
2050
2050
/* Create a COW inode for atomic write */
2051
2051
pinode = f2fs_iget (inode -> i_sb , fi -> i_pino );
2052
2052
if (IS_ERR (pinode )) {
2053
- f2fs_up_write (& F2FS_I ( inode ) -> i_gc_rwsem [WRITE ]);
2053
+ f2fs_up_write (& fi -> i_gc_rwsem [WRITE ]);
2054
2054
ret = PTR_ERR (pinode );
2055
2055
goto out ;
2056
2056
}
2057
2057
2058
2058
ret = f2fs_get_tmpfile (mnt_userns , pinode , & fi -> cow_inode );
2059
2059
iput (pinode );
2060
2060
if (ret ) {
2061
- f2fs_up_write (& F2FS_I ( inode ) -> i_gc_rwsem [WRITE ]);
2061
+ f2fs_up_write (& fi -> i_gc_rwsem [WRITE ]);
2062
2062
goto out ;
2063
2063
}
2064
2064
f2fs_i_size_write (fi -> cow_inode , i_size_read (inode ));
@@ -2070,10 +2070,10 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
2070
2070
set_inode_flag (inode , FI_ATOMIC_FILE );
2071
2071
set_inode_flag (fi -> cow_inode , FI_ATOMIC_FILE );
2072
2072
clear_inode_flag (fi -> cow_inode , FI_INLINE_DATA );
2073
- f2fs_up_write (& F2FS_I ( inode ) -> i_gc_rwsem [WRITE ]);
2073
+ f2fs_up_write (& fi -> i_gc_rwsem [WRITE ]);
2074
2074
2075
- f2fs_update_time (F2FS_I_SB ( inode ) , REQ_TIME );
2076
- F2FS_I ( inode ) -> atomic_write_task = current ;
2075
+ f2fs_update_time (sbi , REQ_TIME );
2076
+ fi -> atomic_write_task = current ;
2077
2077
stat_update_max_atomic_write (inode );
2078
2078
out :
2079
2079
inode_unlock (inode );
@@ -2952,7 +2952,7 @@ static int f2fs_ioc_setproject(struct inode *inode, __u32 projid)
2952
2952
2953
2953
kprojid = make_kprojid (& init_user_ns , (projid_t )projid );
2954
2954
2955
- if (projid_eq (kprojid , F2FS_I ( inode ) -> i_projid ))
2955
+ if (projid_eq (kprojid , fi -> i_projid ))
2956
2956
return 0 ;
2957
2957
2958
2958
err = - EPERM ;
@@ -2972,7 +2972,7 @@ static int f2fs_ioc_setproject(struct inode *inode, __u32 projid)
2972
2972
if (err )
2973
2973
goto out_unlock ;
2974
2974
2975
- F2FS_I ( inode ) -> i_projid = kprojid ;
2975
+ fi -> i_projid = kprojid ;
2976
2976
inode -> i_ctime = current_time (inode );
2977
2977
f2fs_mark_inode_dirty_sync (inode , true);
2978
2978
out_unlock :
@@ -3922,7 +3922,7 @@ static int f2fs_ioc_decompress_file(struct file *filp, unsigned long arg)
3922
3922
struct f2fs_inode_info * fi = F2FS_I (inode );
3923
3923
pgoff_t page_idx = 0 , last_idx ;
3924
3924
unsigned int blk_per_seg = sbi -> blocks_per_seg ;
3925
- int cluster_size = F2FS_I ( inode ) -> i_cluster_size ;
3925
+ int cluster_size = fi -> i_cluster_size ;
3926
3926
int count , ret ;
3927
3927
3928
3928
if (!f2fs_sb_has_compression (sbi ) ||
0 commit comments