namei.c (b0504bfe1b8acdcfb5ef466581d930835ef3c49e) namei.c (f01d08899fd7fa808ff9b8d33ca4882ab44d42fa)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2011 Novell Inc.
4 * Copyright (C) 2016 Red Hat, Inc.
5 */
6
7#include <linux/fs.h>
8#include <linux/cred.h>

--- 878 unchanged lines hidden (view full) ---

887 err = ovl_set_impure(dentry->d_parent, upper->d_parent);
888
889 ovl_drop_write(dentry);
890 return err;
891}
892
893static int ovl_maybe_validate_verity(struct dentry *dentry)
894{
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2011 Novell Inc.
4 * Copyright (C) 2016 Red Hat, Inc.
5 */
6
7#include <linux/fs.h>
8#include <linux/cred.h>

--- 878 unchanged lines hidden (view full) ---

887 err = ovl_set_impure(dentry->d_parent, upper->d_parent);
888
889 ovl_drop_write(dentry);
890 return err;
891}
892
893static int ovl_maybe_validate_verity(struct dentry *dentry)
894{
895 struct ovl_fs *ofs = dentry->d_sb->s_fs_info;
895 struct ovl_fs *ofs = OVL_FS(dentry->d_sb);
896 struct inode *inode = d_inode(dentry);
897 struct path datapath, metapath;
898 int err;
899
900 if (!ofs->config.verity_mode ||
901 !ovl_is_metacopy_dentry(dentry) ||
902 ovl_test_flag(OVL_VERIFIED_DIGEST, inode))
903 return 0;

--- 93 unchanged lines hidden (view full) ---

997 return ovl_maybe_validate_verity(dentry);
998}
999
1000struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
1001 unsigned int flags)
1002{
1003 struct ovl_entry *oe = NULL;
1004 const struct cred *old_cred;
896 struct inode *inode = d_inode(dentry);
897 struct path datapath, metapath;
898 int err;
899
900 if (!ofs->config.verity_mode ||
901 !ovl_is_metacopy_dentry(dentry) ||
902 ovl_test_flag(OVL_VERIFIED_DIGEST, inode))
903 return 0;

--- 93 unchanged lines hidden (view full) ---

997 return ovl_maybe_validate_verity(dentry);
998}
999
1000struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
1001 unsigned int flags)
1002{
1003 struct ovl_entry *oe = NULL;
1004 const struct cred *old_cred;
1005 struct ovl_fs *ofs = dentry->d_sb->s_fs_info;
1005 struct ovl_fs *ofs = OVL_FS(dentry->d_sb);
1006 struct ovl_entry *poe = OVL_E(dentry->d_parent);
1007 struct ovl_entry *roe = OVL_E(dentry->d_sb->s_root);
1008 struct ovl_path *stack = NULL, *origin_path = NULL;
1009 struct dentry *upperdir, *upperdentry = NULL;
1010 struct dentry *origin = NULL;
1011 struct dentry *index = NULL;
1012 unsigned int ctr = 0;
1013 struct inode *inode = NULL;

--- 381 unchanged lines hidden ---
1006 struct ovl_entry *poe = OVL_E(dentry->d_parent);
1007 struct ovl_entry *roe = OVL_E(dentry->d_sb->s_root);
1008 struct ovl_path *stack = NULL, *origin_path = NULL;
1009 struct dentry *upperdir, *upperdentry = NULL;
1010 struct dentry *origin = NULL;
1011 struct dentry *index = NULL;
1012 unsigned int ctr = 0;
1013 struct inode *inode = NULL;

--- 381 unchanged lines hidden ---