diff options
author | Jeff Layton <jlayton@redhat.com> | 2018-01-29 06:41:30 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2018-01-29 06:41:30 -0500 |
commit | ae5e165d855dd978a461b22175531b07f54fb61f (patch) | |
tree | 8b603c15aff71082d3d9e67b7eab089396349ce0 /include/linux/fs.h | |
parent | 7a11ac289c437cb06633620940b191a63dec1f4a (diff) | |
download | linux-stable-ae5e165d855dd978a461b22175531b07f54fb61f.tar.gz linux-stable-ae5e165d855dd978a461b22175531b07f54fb61f.tar.bz2 linux-stable-ae5e165d855dd978a461b22175531b07f54fb61f.zip |
fs: new API for handling inode->i_version
Add a documentation blob that explains what the i_version field is, how
it is expected to work, and how it is currently implemented by various
filesystems.
We already have inode_inc_iversion. Add several other functions for
manipulating and accessing the i_version counter. For now, the
implementation is trivial and basically works the way that all of the
open-coded i_version accesses work today.
Future patches will convert existing users of i_version to use the new
API, and then convert the backend implementation to do things more
efficiently.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 511fbaabf624..76382c24e9d0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2036,21 +2036,6 @@ static inline void inode_dec_link_count(struct inode *inode) mark_inode_dirty(inode); } -/** - * inode_inc_iversion - increments i_version - * @inode: inode that need to be updated - * - * Every time the inode is modified, the i_version field will be incremented. - * The filesystem has to be mounted with i_version flag - */ - -static inline void inode_inc_iversion(struct inode *inode) -{ - spin_lock(&inode->i_lock); - inode->i_version++; - spin_unlock(&inode->i_lock); -} - enum file_time_flags { S_ATIME = 1, S_MTIME = 2, |