@@ -245,39 +245,39 @@ static inline void set_to_next_nat(struct f2fs_nm_info *nm_i, nid_t start_nid)
245
245
246
246
static inline nid_t ino_of_node (const struct folio * node_folio )
247
247
{
248
- struct f2fs_node * rn = F2FS_NODE (& node_folio -> page );
248
+ struct f2fs_node * rn = F2FS_NODE (node_folio );
249
249
return le32_to_cpu (rn -> footer .ino );
250
250
}
251
251
252
252
static inline nid_t nid_of_node (const struct folio * node_folio )
253
253
{
254
- struct f2fs_node * rn = F2FS_NODE (& node_folio -> page );
254
+ struct f2fs_node * rn = F2FS_NODE (node_folio );
255
255
return le32_to_cpu (rn -> footer .nid );
256
256
}
257
257
258
258
static inline unsigned int ofs_of_node (const struct folio * node_folio )
259
259
{
260
- struct f2fs_node * rn = F2FS_NODE (& node_folio -> page );
260
+ struct f2fs_node * rn = F2FS_NODE (node_folio );
261
261
unsigned flag = le32_to_cpu (rn -> footer .flag );
262
262
return flag >> OFFSET_BIT_SHIFT ;
263
263
}
264
264
265
265
static inline __u64 cpver_of_node (const struct folio * node_folio )
266
266
{
267
- struct f2fs_node * rn = F2FS_NODE (& node_folio -> page );
267
+ struct f2fs_node * rn = F2FS_NODE (node_folio );
268
268
return le64_to_cpu (rn -> footer .cp_ver );
269
269
}
270
270
271
- static inline block_t next_blkaddr_of_node (struct folio * node_folio )
271
+ static inline block_t next_blkaddr_of_node (const struct folio * node_folio )
272
272
{
273
- struct f2fs_node * rn = F2FS_NODE (& node_folio -> page );
273
+ struct f2fs_node * rn = F2FS_NODE (node_folio );
274
274
return le32_to_cpu (rn -> footer .next_blkaddr );
275
275
}
276
276
277
277
static inline void fill_node_footer (const struct folio * folio , nid_t nid ,
278
278
nid_t ino , unsigned int ofs , bool reset )
279
279
{
280
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
280
+ struct f2fs_node * rn = F2FS_NODE (folio );
281
281
unsigned int old_flag = 0 ;
282
282
283
283
if (reset )
@@ -296,15 +296,15 @@ static inline void fill_node_footer(const struct folio *folio, nid_t nid,
296
296
static inline void copy_node_footer (const struct folio * dst ,
297
297
const struct folio * src )
298
298
{
299
- struct f2fs_node * src_rn = F2FS_NODE (& src -> page );
300
- struct f2fs_node * dst_rn = F2FS_NODE (& dst -> page );
299
+ struct f2fs_node * src_rn = F2FS_NODE (src );
300
+ struct f2fs_node * dst_rn = F2FS_NODE (dst );
301
301
memcpy (& dst_rn -> footer , & src_rn -> footer , sizeof (struct node_footer ));
302
302
}
303
303
304
304
static inline void fill_node_footer_blkaddr (struct folio * folio , block_t blkaddr )
305
305
{
306
306
struct f2fs_checkpoint * ckpt = F2FS_CKPT (F2FS_F_SB (folio ));
307
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
307
+ struct f2fs_node * rn = F2FS_NODE (folio );
308
308
__u64 cp_ver = cur_cp_version (ckpt );
309
309
310
310
if (__is_set_ckpt_flags (ckpt , CP_CRC_RECOVERY_FLAG ))
@@ -370,7 +370,7 @@ static inline bool IS_DNODE(const struct folio *node_folio)
370
370
371
371
static inline int set_nid (struct folio * folio , int off , nid_t nid , bool i )
372
372
{
373
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
373
+ struct f2fs_node * rn = F2FS_NODE (folio );
374
374
375
375
f2fs_folio_wait_writeback (folio , NODE , true, true);
376
376
@@ -383,7 +383,7 @@ static inline int set_nid(struct folio *folio, int off, nid_t nid, bool i)
383
383
384
384
static inline nid_t get_nid (const struct folio * folio , int off , bool i )
385
385
{
386
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
386
+ struct f2fs_node * rn = F2FS_NODE (folio );
387
387
388
388
if (i )
389
389
return le32_to_cpu (rn -> i .i_nid [off - NODE_DIR1_BLOCK ]);
@@ -399,7 +399,7 @@ static inline nid_t get_nid(const struct folio *folio, int off, bool i)
399
399
400
400
static inline int is_node (const struct folio * folio , int type )
401
401
{
402
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
402
+ struct f2fs_node * rn = F2FS_NODE (folio );
403
403
return le32_to_cpu (rn -> footer .flag ) & BIT (type );
404
404
}
405
405
@@ -409,7 +409,7 @@ static inline int is_node(const struct folio *folio, int type)
409
409
410
410
static inline void set_cold_node (const struct folio * folio , bool is_dir )
411
411
{
412
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
412
+ struct f2fs_node * rn = F2FS_NODE (folio );
413
413
unsigned int flag = le32_to_cpu (rn -> footer .flag );
414
414
415
415
if (is_dir )
@@ -421,7 +421,7 @@ static inline void set_cold_node(const struct folio *folio, bool is_dir)
421
421
422
422
static inline void set_mark (struct folio * folio , int mark , int type )
423
423
{
424
- struct f2fs_node * rn = F2FS_NODE (& folio -> page );
424
+ struct f2fs_node * rn = F2FS_NODE (folio );
425
425
unsigned int flag = le32_to_cpu (rn -> footer .flag );
426
426
if (mark )
427
427
flag |= BIT (type );
0 commit comments