path: root/Documentation/filesystems
diff options
authorEric Biggers <>2021-01-12 11:02:48 -0800
committerJan Kara <>2021-01-13 17:26:35 +0100
commita38ed483a72672ee6bdb5d8cf17fc0838377baa0 (patch)
treebd94a33a5a7f45e4c5843a225b7247c54371c63b /Documentation/filesystems
parente2728c5621fd9c68c65a6647875a1d1c67b9f257 (diff)
fs: pass only I_DIRTY_INODE flags to ->dirty_inode
->dirty_inode is now only called when I_DIRTY_INODE (I_DIRTY_SYNC and/or I_DIRTY_DATASYNC) is set. However it may still be passed other dirty flags at the same time, provided that these other flags happened to be passed to __mark_inode_dirty() at the same time as I_DIRTY_INODE. This doesn't make sense because there is no reason for filesystems to care about these extra flags. Nor are filesystems notified about all updates to these other flags. Therefore, mask the flags before passing them to ->dirty_inode. Also properly document ->dirty_inode in vfs.rst. Link: Reviewed-by: Christoph Hellwig <> Reviewed-by: Jan Kara <> Signed-off-by: Eric Biggers <> Signed-off-by: Jan Kara <>
Diffstat (limited to 'Documentation/filesystems')
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
index ca52c82e5bb5..287b80948a40 100644
--- a/Documentation/filesystems/vfs.rst
+++ b/Documentation/filesystems/vfs.rst
@@ -270,7 +270,10 @@ or bottom half).
- this method is called by the VFS to mark an inode dirty.
+ this method is called by the VFS when an inode is marked dirty.
+ This is specifically for the inode itself being marked dirty,
+ not its data. If the update needs to be persisted by fdatasync(),
+ then I_DIRTY_DATASYNC will be set in the flags argument.
this method is called when the VFS needs to write an inode to