Lines Matching refs:inode

144 struct backing_dev_info *inode_to_bdi(struct inode *inode);
162 * inode_cgwb_enabled - test whether cgroup writeback is enabled on an inode
163 * @inode: inode of interest
169 * Note that the test result may change dynamically on the same inode
172 static inline bool inode_cgwb_enabled(struct inode *inode)
174 struct backing_dev_info *bdi = inode_to_bdi(inode);
179 (inode->i_sb->s_iflags & SB_I_CGROUPWB);
241 * inode_to_wb - determine the wb of an inode
242 * @inode: inode of interest
244 * Returns the wb @inode is currently associated with. The caller must be
245 * holding either @inode->i_lock, the i_pages lock, or the
248 static inline struct bdi_writeback *inode_to_wb(const struct inode *inode)
252 (!lockdep_is_held(&inode->i_lock) &&
253 !lockdep_is_held(&inode->i_mapping->i_pages.xa_lock) &&
254 !lockdep_is_held(&inode->i_wb->list_lock)));
256 return inode->i_wb;
260 struct inode *inode,
264 * If wbc does not have inode attached, it means cgroup writeback was
267 return wbc->wb ? wbc->wb : &inode_to_bdi(inode)->wb;
271 * unlocked_inode_to_wb_begin - begin unlocked inode wb access transaction
272 * @inode: target inode
275 * The caller wants to access the wb associated with @inode but isn't
276 * holding inode->i_lock, the i_pages lock or wb->list_lock. This
277 * function determines the wb associated with @inode and ensures that the
286 unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie)
294 cookie->locked = smp_load_acquire(&inode->i_state) & I_WB_SWITCH;
297 xa_lock_irqsave(&inode->i_mapping->i_pages, cookie->flags);
303 return inode->i_wb;
307 * unlocked_inode_to_wb_end - end inode wb access transaction
308 * @inode: target inode
311 static inline void unlocked_inode_to_wb_end(struct inode *inode,
315 xa_unlock_irqrestore(&inode->i_mapping->i_pages, cookie->flags);
322 static inline bool inode_cgwb_enabled(struct inode *inode)
338 static inline struct bdi_writeback *inode_to_wb(struct inode *inode)
340 return &inode_to_bdi(inode)->wb;
344 struct inode *inode,
347 return inode_to_wb(inode);
352 unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie)
354 return inode_to_wb(inode);
357 static inline void unlocked_inode_to_wb_end(struct inode *inode,