aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/overlayfs/export.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-01-24 09:46:45 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2020-01-24 09:46:45 +0100
commit1346416564f06444ca59778c05607bedb91a991a (patch)
tree605888ab1b04c2bf048464bc4e435fd1b5ca020b /fs/overlayfs/export.c
parentovl: fix corner case of non-constant st_dev;st_ino (diff)
downloadwireguard-linux-1346416564f06444ca59778c05607bedb91a991a.tar.xz
wireguard-linux-1346416564f06444ca59778c05607bedb91a991a.zip
ovl: layer is const
The ovl_layer struct is never modified except at initialization. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/export.c')
-rw-r--r--fs/overlayfs/export.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c
index d01f938fcc5c..6f54d70cef27 100644
--- a/fs/overlayfs/export.c
+++ b/fs/overlayfs/export.c
@@ -358,7 +358,7 @@ static struct dentry *ovl_dentry_real_at(struct dentry *dentry, int idx)
*/
static struct dentry *ovl_lookup_real_one(struct dentry *connected,
struct dentry *real,
- struct ovl_layer *layer)
+ const struct ovl_layer *layer)
{
struct inode *dir = d_inode(connected);
struct dentry *this, *parent = NULL;
@@ -414,14 +414,14 @@ fail:
static struct dentry *ovl_lookup_real(struct super_block *sb,
struct dentry *real,
- struct ovl_layer *layer);
+ const struct ovl_layer *layer);
/*
* Lookup an indexed or hashed overlay dentry by real inode.
*/
static struct dentry *ovl_lookup_real_inode(struct super_block *sb,
struct dentry *real,
- struct ovl_layer *layer)
+ const struct ovl_layer *layer)
{
struct ovl_fs *ofs = sb->s_fs_info;
struct dentry *index = NULL;
@@ -486,7 +486,7 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb,
*/
static struct dentry *ovl_lookup_real_ancestor(struct super_block *sb,
struct dentry *real,
- struct ovl_layer *layer)
+ const struct ovl_layer *layer)
{
struct dentry *next, *parent = NULL;
struct dentry *ancestor = ERR_PTR(-EIO);
@@ -539,7 +539,7 @@ static struct dentry *ovl_lookup_real_ancestor(struct super_block *sb,
*/
static struct dentry *ovl_lookup_real(struct super_block *sb,
struct dentry *real,
- struct ovl_layer *layer)
+ const struct ovl_layer *layer)
{
struct dentry *connected;
int err = 0;
@@ -645,7 +645,7 @@ static struct dentry *ovl_get_dentry(struct super_block *sb,
struct dentry *index)
{
struct ovl_fs *ofs = sb->s_fs_info;
- struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer;
+ const struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer;
struct dentry *real = upper ?: (index ?: lowerpath->dentry);
/*