Lines Matching refs:inode
138 static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) in inode_to_bdi() argument
142 if (!inode) in inode_to_bdi()
145 sb = inode->i_sb; in inode_to_bdi()
148 return I_BDEV(inode)->bd_disk->bdi; in inode_to_bdi()
181 int inode_congested(struct inode *inode, int cong_bits);
194 static inline bool inode_cgwb_enabled(struct inode *inode) in inode_cgwb_enabled() argument
196 struct backing_dev_info *bdi = inode_to_bdi(inode); in inode_cgwb_enabled()
201 (inode->i_sb->s_iflags & SB_I_CGROUPWB); in inode_cgwb_enabled()
269 static inline bool inode_to_wb_is_valid(struct inode *inode) in inode_to_wb_is_valid() argument
271 return inode->i_wb; in inode_to_wb_is_valid()
282 static inline struct bdi_writeback *inode_to_wb(const struct inode *inode) in inode_to_wb() argument
286 (!lockdep_is_held(&inode->i_lock) && in inode_to_wb()
287 !lockdep_is_held(&inode->i_mapping->i_pages.xa_lock) && in inode_to_wb()
288 !lockdep_is_held(&inode->i_wb->list_lock))); in inode_to_wb()
290 return inode->i_wb; in inode_to_wb()
294 struct inode *inode, in inode_to_wb_wbc() argument
301 return wbc->wb ? wbc->wb : &inode_to_bdi(inode)->wb; in inode_to_wb_wbc()
320 unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie) in unlocked_inode_to_wb_begin() argument
328 cookie->locked = smp_load_acquire(&inode->i_state) & I_WB_SWITCH; in unlocked_inode_to_wb_begin()
331 xa_lock_irqsave(&inode->i_mapping->i_pages, cookie->flags); in unlocked_inode_to_wb_begin()
337 return inode->i_wb; in unlocked_inode_to_wb_begin()
345 static inline void unlocked_inode_to_wb_end(struct inode *inode, in unlocked_inode_to_wb_end() argument
349 xa_unlock_irqrestore(&inode->i_mapping->i_pages, cookie->flags); in unlocked_inode_to_wb_end()
356 static inline bool inode_cgwb_enabled(struct inode *inode) in inode_cgwb_enabled() argument
372 static inline bool inode_to_wb_is_valid(struct inode *inode) in inode_to_wb_is_valid() argument
377 static inline struct bdi_writeback *inode_to_wb(struct inode *inode) in inode_to_wb() argument
379 return &inode_to_bdi(inode)->wb; in inode_to_wb()
383 struct inode *inode, in inode_to_wb_wbc() argument
386 return inode_to_wb(inode); in inode_to_wb_wbc()
391 unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie) in unlocked_inode_to_wb_begin() argument
393 return inode_to_wb(inode); in unlocked_inode_to_wb_begin()
396 static inline void unlocked_inode_to_wb_end(struct inode *inode, in unlocked_inode_to_wb_end() argument
409 static inline int inode_congested(struct inode *inode, int cong_bits) in inode_congested() argument
411 return wb_congested(&inode_to_bdi(inode)->wb, cong_bits); in inode_congested()
416 static inline int inode_read_congested(struct inode *inode) in inode_read_congested() argument
418 return inode_congested(inode, 1 << WB_sync_congested); in inode_read_congested()
421 static inline int inode_write_congested(struct inode *inode) in inode_write_congested() argument
423 return inode_congested(inode, 1 << WB_async_congested); in inode_write_congested()
426 static inline int inode_rw_congested(struct inode *inode) in inode_rw_congested() argument
428 return inode_congested(inode, (1 << WB_sync_congested) | in inode_rw_congested()