summaryrefslogtreecommitdiff
path: root/fs/overlayfs/export.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2018-05-08 16:27:21 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2018-05-31 12:06:12 +0300
commitac6a52eb65b5327859135269c9374bf2ff731c9f (patch)
treed9df845487315b3475d363f3c74ef37644d89c0a /fs/overlayfs/export.c
parent80ea09a002bf4384fda5f087b1b198b3a274f9da (diff)
downloadlinux-ac6a52eb65b5327859135269c9374bf2ff731c9f.tar.xz
ovl: Pass argument to ovl_get_inode() in a structure
ovl_get_inode() right now has 5 parameters. Soon this patch series will add 2 more and suddenly argument list starts looking too long. Hence pass arguments to ovl_get_inode() in a structure and it looks little cleaner. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/export.c')
-rw-r--r--fs/overlayfs/export.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c
index 425a94672300..9941ece61a14 100644
--- a/fs/overlayfs/export.c
+++ b/fs/overlayfs/export.c
@@ -300,12 +300,18 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb,
struct dentry *dentry;
struct inode *inode;
struct ovl_entry *oe;
+ struct ovl_inode_params oip = {
+ .lowerpath = lowerpath,
+ .index = index,
+ .numlower = !!lower
+ };
/* We get overlay directory dentries with ovl_lookup_real() */
if (d_is_dir(upper ?: lower))
return ERR_PTR(-EIO);
- inode = ovl_get_inode(sb, dget(upper), lowerpath, index, !!lower);
+ oip.upperdentry = dget(upper);
+ inode = ovl_get_inode(sb, &oip);
if (IS_ERR(inode)) {
dput(upper);
return ERR_CAST(inode);