overlayfs: make mcoverlayfs compile for 4.14.0-115 (el7 arm64)

Use the 4.18 module as a base

Change-Id: I6c9ef66399800828e1932573da5a97573545c5da
This commit is contained in:
Dominique Martinet
2019-01-15 14:29:05 +09:00
parent 0fbdcc44b9
commit f5320fc2b4
7 changed files with 46 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include <linux/seq_file.h>
#include <linux/posix_acl_xattr.h>
#include <linux/exportfs.h>
#include <linux/version.h>
#include "overlayfs.h"
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
@@ -726,7 +727,11 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path)
return 0;
out_put:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
path_put_init(path);
#else
path_put(path);
#endif
out:
return err;
}
@@ -744,7 +749,11 @@ static int ovl_mount_dir(const char *name, struct path *path)
if (ovl_dentry_remote(path->dentry)) {
pr_err("overlayfs: filesystem on '%s' not supported as upperdir\n",
tmp);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
path_put_init(path);
#else
path_put(path);
#endif
err = -EINVAL;
}
kfree(tmp);
@@ -805,7 +814,11 @@ static int ovl_lower_dir(const char *name, struct path *path,
return 0;
out_put:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
path_put_init(path);
#else
path_put(path);
#endif
out:
return err;
}