File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,20 @@ static inline struct address_space *page_mapping_file(struct page *page)
253
253
return folio_mapping (folio );
254
254
}
255
255
256
+ /**
257
+ * folio_inode - Get the host inode for this folio.
258
+ * @folio: The folio.
259
+ *
260
+ * For folios which are in the page cache, return the inode that this folio
261
+ * belongs to.
262
+ *
263
+ * Do not call this for folios which aren't in the page cache.
264
+ */
265
+ static inline struct inode * folio_inode (struct folio * folio )
266
+ {
267
+ return folio -> mapping -> host ;
268
+ }
269
+
256
270
static inline bool page_cache_add_speculative (struct page * page , int count )
257
271
{
258
272
VM_BUG_ON_PAGE (PageTail (page ), page );
Original file line number Diff line number Diff line change @@ -2967,7 +2967,7 @@ EXPORT_SYMBOL_GPL(folio_wait_writeback_killable);
2967
2967
*/
2968
2968
void folio_wait_stable (struct folio * folio )
2969
2969
{
2970
- if (folio -> mapping -> host -> i_sb -> s_iflags & SB_I_STABLE_WRITES )
2970
+ if (folio_inode ( folio ) -> i_sb -> s_iflags & SB_I_STABLE_WRITES )
2971
2971
folio_wait_writeback (folio );
2972
2972
}
2973
2973
EXPORT_SYMBOL_GPL (folio_wait_stable );
You can’t perform that action at this time.
0 commit comments