aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/porting
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/porting')
-rw-r--r--Documentation/filesystems/porting16
1 files changed, 7 insertions, 9 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 74acd961881..8c91d1057d9 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -297,7 +297,8 @@ in the beginning of ->setattr unconditionally.
297be used instead. It gets called whenever the inode is evicted, whether it has 297be used instead. It gets called whenever the inode is evicted, whether it has
298remaining links or not. Caller does *not* evict the pagecache or inode-associated 298remaining links or not. Caller does *not* evict the pagecache or inode-associated
299metadata buffers; getting rid of those is responsibility of method, as it had 299metadata buffers; getting rid of those is responsibility of method, as it had
300been for ->delete_inode(). 300been for ->delete_inode(). Caller makes sure async writeback cannot be running
301for the inode while (or after) ->evict_inode() is called.
301 302
302 ->drop_inode() returns int now; it's called on final iput() with 303 ->drop_inode() returns int now; it's called on final iput() with
303inode->i_lock held and it returns true if filesystems wants the inode to be 304inode->i_lock held and it returns true if filesystems wants the inode to be
@@ -306,14 +307,11 @@ updated appropriately. generic_delete_inode() is also alive and it consists
306simply of return 1. Note that all actual eviction work is done by caller after 307simply of return 1. Note that all actual eviction work is done by caller after
307->drop_inode() returns. 308->drop_inode() returns.
308 309
309 clear_inode() is gone; use end_writeback() instead. As before, it must 310 As before, clear_inode() must be called exactly once on each call of
310be called exactly once on each call of ->evict_inode() (as it used to be for 311->evict_inode() (as it used to be for each call of ->delete_inode()). Unlike
311each call of ->delete_inode()). Unlike before, if you are using inode-associated 312before, if you are using inode-associated metadata buffers (i.e.
312metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to 313mark_buffer_dirty_inode()), it's your responsibility to call
313call invalidate_inode_buffers() before end_writeback(). 314invalidate_inode_buffers() before clear_inode().
314 No async writeback (and thus no calls of ->write_inode()) will happen
315after end_writeback() returns, so actions that should not overlap with ->write_inode()
316(e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call.
317 315
318 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out 316 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out
319if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() 317if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput()