diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2022-10-07 17:35:26 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2022-12-08 10:49:46 +0100 |
commit | 1fa9c5c5eddef0505b353031b7605c97e4257e62 (patch) | |
tree | e3102911612fa603fc5893c45d7bd402714d3d63 /fs/overlayfs/util.c | |
parent | cf4ef7801a8c880902a07712ba7ff61d8e954f85 (diff) | |
download | lwn-1fa9c5c5eddef0505b353031b7605c97e4257e62.tar.gz lwn-1fa9c5c5eddef0505b353031b7605c97e4257e62.zip |
ovl: use inode instead of dentry where possible
Passing dentry to some helpers is unnecessary. Simplify these cases.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r-- | fs/overlayfs/util.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index c0c20d33691b..bde291623c8c 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -463,7 +463,7 @@ static void ovl_dir_version_inc(struct dentry *dentry, bool impurity) * which have been copied up and have origins), so only need to note * changes to impure entries. */ - if (!ovl_dir_is_real(dentry) || impurity) + if (!ovl_dir_is_real(inode) || impurity) OVL_I(inode)->version++; } @@ -475,10 +475,8 @@ void ovl_dir_modified(struct dentry *dentry, bool impurity) ovl_dir_version_inc(dentry, impurity); } -u64 ovl_dentry_version_get(struct dentry *dentry) +u64 ovl_inode_version_get(struct inode *inode) { - struct inode *inode = d_inode(dentry); - WARN_ON(!inode_is_locked(inode)); return OVL_I(inode)->version; } |