summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/namei.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2018-05-08 15:27:21 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2018-05-31 11:06:12 +0200
commitac6a52eb65b5327859135269c9374bf2ff731c9f (patch)
treed9df845487315b3475d363f3c74ef37644d89c0a /fs/overlayfs/namei.c
parentvfs: factor out inode_insert5() (diff)
downloadlinux-ac6a52eb65b5327859135269c9374bf2ff731c9f.tar.xz
linux-ac6a52eb65b5327859135269c9374bf2ff731c9f.zip
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/namei.c')
-rw-r--r--fs/overlayfs/namei.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index 2dba29eadde6..08801b45df00 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -1004,8 +1004,14 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
upperdentry = dget(index);
if (upperdentry || ctr) {
- inode = ovl_get_inode(dentry->d_sb, upperdentry, stack, index,
- ctr);
+ struct ovl_inode_params oip = {
+ .upperdentry = upperdentry,
+ .lowerpath = stack,
+ .index = index,
+ .numlower = ctr,
+ };
+
+ inode = ovl_get_inode(dentry->d_sb, &oip);
err = PTR_ERR(inode);
if (IS_ERR(inode))
goto out_free_oe;