summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanabishi2021-09-05 03:02:39 +0500
committerHanabishi2021-09-05 03:02:39 +0500
commit4081de9d56f1705774acd5e345b2a9ce18ff223f (patch)
tree7180390765ffaed89d7458853e0e8265b6ea93ca
parentc0ec3c4b234f9292f747da2e5abc39214ad5de0c (diff)
downloadaur-4081de9d56f1705774acd5e345b2a9ce18ff223f.tar.gz
Update to in-tree version
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD28
-rw-r--r--kernel-5.12-backport.patch219
-rw-r--r--kernel-5.14-backport.patch39
4 files changed, 172 insertions, 138 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c07992167da..7978885cbd76 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ntfs3-dkms
pkgdesc = NTFS read-write driver GPL implementation by Paragon Software. Current version works with NTFS (including v3.1), normal/compressed/sparse files and supports journal replaying.
pkgver = 27.0.0
- pkgrel = 2
+ pkgrel = 3
url = https://www.paragon-software.com/home/ntfs3-driver-faq/
arch = any
license = GPL2
@@ -15,25 +15,11 @@ pkgbase = ntfs3-dkms
source = dkms.conf
source = kernel-5.12-backport.patch
source = kernel-5.14-backport.patch
- source = ntfs3-v27.0.0~1.patch::https://lore.kernel.org/lkml/20210729134943.778917-2-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~2.patch::https://lore.kernel.org/lkml/20210729134943.778917-3-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~3.patch::https://lore.kernel.org/lkml/20210729134943.778917-4-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~4.patch::https://lore.kernel.org/lkml/20210729134943.778917-5-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~5.patch::https://lore.kernel.org/lkml/20210729134943.778917-6-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~6.patch::https://lore.kernel.org/lkml/20210729134943.778917-7-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~7.patch::https://lore.kernel.org/lkml/20210729134943.778917-8-almaz.alexandrovich@paragon-software.com/raw
- source = ntfs3-v27.0.0~8.patch::https://lore.kernel.org/lkml/20210729134943.778917-9-almaz.alexandrovich@paragon-software.com/raw
+ source = ntfs3-v27.0.0.patch::https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/rawdiff/?id=f7464060f7ab9a2424428008f0ee9f1e267e410f&id2=6abaa83c7352b31450d7e8c173f674324c16b02b
sha512sums = 533c249f0f6bd4833faf02d0d92ca1b5802a49afc5feb2e46a7d37275cfca7896db76cd83593f4f313977d278a9a7e92eda550667be2b93910c49cfb68ead4fb
sha512sums = ac00adb4a6d7fc685c39af054474631c930455e9ad0838338e6b3622b72451e81397506866b83a4a51dd0e34ed7752963c0fed9e8b017da5122e0dca3d345fb6
- sha512sums = 374c6fa524defb5dcac093493bc7526e43ca9fe07602357fb51df4a26b02280ba4f2d764d3ba2ba2b32d5318ef466f3e0b6cbfdad1cdac0b04c31e8543114e33
- sha512sums = 081b19b271ed89c47a9306874827a0c15feba6dda6d7c8a085f634a72a6691a78fdeccf47488ed141b979f7bfbf3df2d117301f09ba2da8416449460d4711d34
- sha512sums = 5a018d5f5255a907dc40eeb8819163addd0a84e588c9ff81ca0abd5b5d01f8921966ef530ed71b3504e43a23ee0250a6eebb673c19b0350e125d4261cef147c1
- sha512sums = 6485a1b72e40b44a65462762f0b803f021c08960ea7f5efa2b5ba4f6b60f887689ebf7ef8840f9fda1706aa413a76edf78319b31a99623daa1ea5b067859b8d2
- sha512sums = bac7d87d506fde67d637044d15841a8f8c7a90e361efefaa99c0375851f1192210e5e0122466fc44c421426d82445eaa35338386754d67ea9ba0ef6363f9f708
- sha512sums = d06114a86eca34252d5aafb667a3938418594ce096a8930d477849d36f590613bd658bc6bed70a2dac4f8b2a3b619762d1a07d6c516c7871f11d6499b8d5c409
- sha512sums = 27b0cb8de12524b5f6c4725e02631474785dd72608ac9070f1f5d4521cfac4517281b9e7615e88ace923e55fcca90462797d2f0ee5da08317c43aae00cd54beb
- sha512sums = 5791f97578c47f5332076bd9d6d4388df1a4392ac110a4649965806502db20a0184f9b1f1826ad2b129d99f2f46f15ee69312509393cda401774825b0285d5bd
- sha512sums = e35dfc2144e5449fb7ca76555eb0067595589bd0fe0a30a9a1dd8642be66912bf3a7545b9f6bf4b5a9397b894a1b63535372b5ec268179dd35b5890c8bb744be
- sha512sums = 16605ef35c3534e61e8d06655e9c7237ee04e163e972f2c8b77ba9adfe775813a1788a5333bcd9cc41b6cd8e051f71c89f33f620047e302b24464c5d0ab1edf1
+ sha512sums = 6f6190825febee219e10be6583718afc9360b3b4c69e06f8d59715da8f73a855d4f652b1ef77064ca100fd15678e13a0ef10bb7837f10c0784530eff1694340d
+ sha512sums = 123d8e937e260835f984a6ee21c750575e13225a1ba8f51bf0c3f6eb3bad8f9dd7d40202f0edce637403ff7de0184ff33bec4e5201e6718e539f571605e0c546
+ sha512sums = d19089027897871b6ae339b206f74aed12a0c9e7235a104eb995ca1b7ddf49cb531631b360e4c678f37ccdd7bac629959040e810be18d247259334ef35f32af6
pkgname = ntfs3-dkms
diff --git a/PKGBUILD b/PKGBUILD
index 3ca27da43549..35172171202c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=ntfs3-dkms
pkgver=27.0.0
-pkgrel=2
+pkgrel=3
pkgdesc="NTFS read-write driver GPL implementation by Paragon Software. Current version works with NTFS (including v3.1), normal/compressed/sparse files and supports journal replaying."
arch=('any')
url='https://www.paragon-software.com/home/ntfs3-driver-faq/'
@@ -15,38 +15,22 @@ source=(
dkms.conf
kernel-5.12-backport.patch
kernel-5.14-backport.patch
- "ntfs3-v${pkgver}~1.patch::https://lore.kernel.org/lkml/20210729134943.778917-2-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~2.patch::https://lore.kernel.org/lkml/20210729134943.778917-3-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~3.patch::https://lore.kernel.org/lkml/20210729134943.778917-4-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~4.patch::https://lore.kernel.org/lkml/20210729134943.778917-5-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~5.patch::https://lore.kernel.org/lkml/20210729134943.778917-6-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~6.patch::https://lore.kernel.org/lkml/20210729134943.778917-7-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~7.patch::https://lore.kernel.org/lkml/20210729134943.778917-8-almaz.alexandrovich@paragon-software.com/raw"
- "ntfs3-v${pkgver}~8.patch::https://lore.kernel.org/lkml/20210729134943.778917-9-almaz.alexandrovich@paragon-software.com/raw"
+ "ntfs3-v${pkgver}.patch::https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/rawdiff/?id=f7464060f7ab9a2424428008f0ee9f1e267e410f&id2=6abaa83c7352b31450d7e8c173f674324c16b02b"
)
sha512sums=(
'533c249f0f6bd4833faf02d0d92ca1b5802a49afc5feb2e46a7d37275cfca7896db76cd83593f4f313977d278a9a7e92eda550667be2b93910c49cfb68ead4fb'
'ac00adb4a6d7fc685c39af054474631c930455e9ad0838338e6b3622b72451e81397506866b83a4a51dd0e34ed7752963c0fed9e8b017da5122e0dca3d345fb6'
- '374c6fa524defb5dcac093493bc7526e43ca9fe07602357fb51df4a26b02280ba4f2d764d3ba2ba2b32d5318ef466f3e0b6cbfdad1cdac0b04c31e8543114e33'
- '081b19b271ed89c47a9306874827a0c15feba6dda6d7c8a085f634a72a6691a78fdeccf47488ed141b979f7bfbf3df2d117301f09ba2da8416449460d4711d34'
- '5a018d5f5255a907dc40eeb8819163addd0a84e588c9ff81ca0abd5b5d01f8921966ef530ed71b3504e43a23ee0250a6eebb673c19b0350e125d4261cef147c1'
- '6485a1b72e40b44a65462762f0b803f021c08960ea7f5efa2b5ba4f6b60f887689ebf7ef8840f9fda1706aa413a76edf78319b31a99623daa1ea5b067859b8d2'
- 'bac7d87d506fde67d637044d15841a8f8c7a90e361efefaa99c0375851f1192210e5e0122466fc44c421426d82445eaa35338386754d67ea9ba0ef6363f9f708'
- 'd06114a86eca34252d5aafb667a3938418594ce096a8930d477849d36f590613bd658bc6bed70a2dac4f8b2a3b619762d1a07d6c516c7871f11d6499b8d5c409'
- '27b0cb8de12524b5f6c4725e02631474785dd72608ac9070f1f5d4521cfac4517281b9e7615e88ace923e55fcca90462797d2f0ee5da08317c43aae00cd54beb'
- '5791f97578c47f5332076bd9d6d4388df1a4392ac110a4649965806502db20a0184f9b1f1826ad2b129d99f2f46f15ee69312509393cda401774825b0285d5bd'
- 'e35dfc2144e5449fb7ca76555eb0067595589bd0fe0a30a9a1dd8642be66912bf3a7545b9f6bf4b5a9397b894a1b63535372b5ec268179dd35b5890c8bb744be'
- '16605ef35c3534e61e8d06655e9c7237ee04e163e972f2c8b77ba9adfe775813a1788a5333bcd9cc41b6cd8e051f71c89f33f620047e302b24464c5d0ab1edf1'
+ '6f6190825febee219e10be6583718afc9360b3b4c69e06f8d59715da8f73a855d4f652b1ef77064ca100fd15678e13a0ef10bb7837f10c0784530eff1694340d'
+ '123d8e937e260835f984a6ee21c750575e13225a1ba8f51bf0c3f6eb3bad8f9dd7d40202f0edce637403ff7de0184ff33bec4e5201e6718e539f571605e0c546'
+ 'd19089027897871b6ae339b206f74aed12a0c9e7235a104eb995ca1b7ddf49cb531631b360e4c678f37ccdd7bac629959040e810be18d247259334ef35f32af6'
)
prepare() {
mkdir -p "${pkgver}"
cd "${pkgver}"
- for patch in "${srcdir}/ntfs3-v${pkgver}"*.patch; do
- patch -p3 -N -i "${patch}"
- done
+ patch -p3 -t -N -i "${srcdir}/ntfs3-v${pkgver}.patch" || true
patch -p0 -N -i "${srcdir}/Makefile.patch"
diff --git a/kernel-5.12-backport.patch b/kernel-5.12-backport.patch
index 1a0c273854be..78bbbc9d584b 100644
--- a/kernel-5.12-backport.patch
+++ b/kernel-5.12-backport.patch
@@ -1,15 +1,15 @@
--- a/file.c
+++ b/file.c
-@@ -76,7 +76,7 @@
+@@ -70,7 +70,7 @@
/*
- * inode_operations::getattr
+ * ntfs_getattr - inode_operations::getattr
*/
-int ntfs_getattr(struct user_namespace *mnt_userns, const struct path *path,
+int ntfs_getattr(const struct path *path,
struct kstat *stat, u32 request_mask, u32 flags)
{
struct inode *inode = d_inode(path->dentry);
-@@ -90,7 +90,7 @@
+@@ -84,7 +84,7 @@
stat->attributes_mask |= STATX_ATTR_COMPRESSED | STATX_ATTR_ENCRYPTED;
@@ -18,16 +18,16 @@
stat->result_mask |= STATX_BTIME;
stat->btime = ni->i_crtime;
-@@ -614,7 +614,7 @@
+@@ -726,7 +726,7 @@
/*
- * inode_operations::setattr
+ * ntfs3_setattr - inode_operations::setattr
*/
-int ntfs3_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
+int ntfs3_setattr(struct dentry *dentry,
struct iattr *attr)
{
struct super_block *sb = dentry->d_sb;
-@@ -633,7 +633,7 @@
+@@ -745,7 +745,7 @@
ia_valid = attr->ia_valid;
}
@@ -36,7 +36,7 @@
if (err)
goto out;
-@@ -658,10 +658,10 @@
+@@ -770,10 +770,10 @@
ni->ni_flags |= NI_FLAG_UPDATE_PARENT;
}
@@ -52,7 +52,7 @@
--- a/fsntfs.c
+++ b/fsntfs.c
-@@ -1620,7 +1620,7 @@
+@@ -1602,7 +1602,7 @@
lbo = (u64)lcn << cluster_bits;
len = (u64)clen << cluster_bits;
new_bio:
@@ -64,7 +64,7 @@
--- a/inode.c
+++ b/inode.c
-@@ -1176,7 +1176,7 @@
+@@ -1171,7 +1171,7 @@
return ERR_PTR(err);
}
@@ -73,10 +73,19 @@
struct inode *dir, struct dentry *dentry,
const struct cpu_str *uni, umode_t mode,
dev_t dev, const char *symname, u32 size,
-@@ -1577,7 +1577,7 @@
+@@ -1284,7 +1284,7 @@
+ goto out3;
+ }
+ inode = &ni->vfs_inode;
+- inode_init_owner(mnt_userns, inode, dir, mode);
++ inode_init_owner(inode, dir, mode);
+ mode = inode->i_mode;
+
+ inode->i_atime = inode->i_mtime = inode->i_ctime = ni->i_crtime =
+@@ -1575,7 +1575,7 @@
#ifdef CONFIG_NTFS3_FS_POSIX_ACL
- if (!is_link && (sb->s_flags & SB_POSIXACL)) {
+ if (!S_ISLNK(mode) && (sb->s_flags & SB_POSIXACL)) {
- err = ntfs_init_acl(mnt_userns, inode, dir);
+ err = ntfs_init_acl(inode, dir);
if (err)
@@ -85,85 +94,94 @@
--- a/namei.c
+++ b/namei.c
-@@ -102,7 +102,7 @@
- *
- * inode_operations::create
+@@ -96,7 +96,7 @@
+ /*
+ * ntfs_create - inode_operations::create
*/
-static int ntfs_create(struct user_namespace *mnt_userns, struct inode *dir,
+static int ntfs_create(struct inode *dir,
struct dentry *dentry, umode_t mode, bool excl)
{
struct ntfs_inode *ni = ntfs_i(dir);
-@@ -110,7 +110,7 @@
+@@ -104,7 +104,7 @@
ni_lock_dir(ni);
- inode = ntfs_create_inode(mnt_userns, dir, dentry, NULL, S_IFREG | mode,
+ inode = ntfs_create_inode(dir, dentry, NULL, S_IFREG | mode,
- 0, NULL, 0, excl, NULL);
+ 0, NULL, 0, NULL);
ni_unlock(ni);
-@@ -184,7 +184,7 @@
+@@ -117,7 +117,7 @@
*
- * inode_operations::symlink
+ * inode_operations::mknod
+ */
+-static int ntfs_mknod(struct user_namespace *mnt_userns, struct inode *dir,
++static int ntfs_mknod(struct inode *dir,
+ struct dentry *dentry, umode_t mode, dev_t rdev)
+ {
+ struct ntfs_inode *ni = ntfs_i(dir);
+@@ -125,7 +125,7 @@
+
+ ni_lock_dir(ni);
+
+- inode = ntfs_create_inode(mnt_userns, dir, dentry, NULL, mode, rdev,
++ inode = ntfs_create_inode(dir, dentry, NULL, mode, rdev,
+ NULL, 0, NULL);
+
+ ni_unlock(ni);
+@@ -195,7 +195,7 @@
+ /*
+ * ntfs_symlink - inode_operations::symlink
*/
-static int ntfs_symlink(struct user_namespace *mnt_userns, struct inode *dir,
+static int ntfs_symlink(struct inode *dir,
struct dentry *dentry, const char *symname)
{
u32 size = strlen(symname);
-@@ -193,7 +193,7 @@
+@@ -204,7 +204,7 @@
ni_lock_dir(ni);
- inode = ntfs_create_inode(mnt_userns, dir, dentry, NULL, S_IFLNK | 0777,
+ inode = ntfs_create_inode(dir, dentry, NULL, S_IFLNK | 0777,
- 0, symname, size, 0, NULL);
+ 0, symname, size, NULL);
ni_unlock(ni);
-@@ -206,7 +206,7 @@
- *
- * inode_operations::mkdir
+@@ -215,7 +215,7 @@
+ /*
+ * ntfs_mkdir- inode_operations::mkdir
*/
-static int ntfs_mkdir(struct user_namespace *mnt_userns, struct inode *dir,
+static int ntfs_mkdir(struct inode *dir,
struct dentry *dentry, umode_t mode)
{
struct inode *inode;
-@@ -214,7 +214,7 @@
+@@ -223,7 +223,7 @@
ni_lock_dir(ni);
- inode = ntfs_create_inode(mnt_userns, dir, dentry, NULL, S_IFDIR | mode,
+ inode = ntfs_create_inode(dir, dentry, NULL, S_IFDIR | mode,
- 0, NULL, -1, 0, NULL);
+ 0, NULL, 0, NULL);
ni_unlock(ni);
-@@ -246,7 +246,7 @@
- *
- * inode_operations::rename
+@@ -251,7 +251,7 @@
+ /*
+ * ntfs_rename - inode_operations::rename
*/
--static int ntfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
-+static int ntfs_rename(struct inode *old_dir,
- struct dentry *old_dentry, struct inode *new_dir,
+-static int ntfs_rename(struct user_namespace *mnt_userns, struct inode *dir,
++static int ntfs_rename(struct inode *dir,
+ struct dentry *dentry, struct inode *new_dir,
struct dentry *new_dentry, u32 flags)
{
-@@ -520,7 +520,7 @@
-
- /*fnd contains tree's path to insert to*/
- /* TODO: init_user_ns? */
-- inode = ntfs_create_inode(&init_user_ns, dir, dentry, uni, mode, 0,
-+ inode = ntfs_create_inode(dir, dentry, uni, mode, 0,
- NULL, 0, excl, fnd);
- err = IS_ERR(inode) ? PTR_ERR(inode)
- : finish_open(file, dentry, ntfs_file_open);
--- a/ntfs_fs.h
+++ b/ntfs_fs.h
-@@ -453,11 +453,11 @@
+@@ -459,11 +459,11 @@
extern const struct file_operations ntfs_dir_operations;
- /* globals from file.c*/
+ /* Globals from file.c */
-int ntfs_getattr(struct user_namespace *mnt_userns, const struct path *path,
+int ntfs_getattr(const struct path *path,
struct kstat *stat, u32 request_mask, u32 flags);
@@ -174,7 +192,7 @@
struct iattr *attr);
int ntfs_file_open(struct inode *inode, struct file *file);
int ntfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
-@@ -644,7 +644,7 @@
+@@ -668,7 +668,7 @@
int ntfs_flush_inodes(struct super_block *sb, struct inode *i1,
struct inode *i2);
int inode_write_data(struct inode *inode, const void *data, size_t bytes);
@@ -183,7 +201,7 @@
struct inode *dir, struct dentry *dentry,
const struct cpu_str *uni, umode_t mode,
dev_t dev, const char *symname, u32 size,
-@@ -784,17 +784,17 @@
+@@ -810,17 +810,17 @@
/* globals from xattr.c */
#ifdef CONFIG_NTFS3_FS_POSIX_ACL
struct posix_acl *ntfs_get_acl(struct inode *inode, int type);
@@ -208,7 +226,7 @@
--- a/super.c
+++ b/super.c
-@@ -542,10 +542,10 @@
+@@ -557,10 +557,10 @@
if (opts->uid)
seq_printf(m, ",uid=%u",
@@ -221,10 +239,19 @@
if (opts->fmask)
seq_printf(m, ",fmask=%04o", ~opts->fs_fmask_inv);
if (opts->dmask)
+@@ -1440,7 +1440,7 @@
+ .name = "ntfs3",
+ .mount = ntfs_mount,
+ .kill_sb = kill_block_super,
+- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
++ .fs_flags = FS_REQUIRES_DEV,
+ };
+ // clang-format on
+
--- a/xattr.c
+++ b/xattr.c
-@@ -473,7 +473,7 @@
+@@ -484,7 +484,7 @@
kfree(acl);
}
@@ -233,16 +260,16 @@
struct inode *inode, int type,
int locked)
{
-@@ -509,7 +509,7 @@
+@@ -520,7 +520,7 @@
- /* Translate extended attribute to acl */
- if (err > 0) {
+ /* Translate extended attribute to acl. */
+ if (err >= 0) {
- acl = posix_acl_from_xattr(mnt_userns, buf, err);
+ acl = posix_acl_from_xattr(&init_user_ns, buf, err);
if (!IS_ERR(acl))
set_cached_acl(inode, type, acl);
} else {
-@@ -529,10 +529,10 @@
+@@ -538,10 +538,10 @@
struct posix_acl *ntfs_get_acl(struct inode *inode, int type)
{
/* TODO: init_user_ns? */
@@ -255,18 +282,18 @@
struct inode *inode, struct posix_acl *acl,
int type, int locked)
{
-@@ -590,7 +590,7 @@
- if (!value)
- return -ENOMEM;
+@@ -599,7 +599,7 @@
+ if (!value)
+ return -ENOMEM;
-- err = posix_acl_to_xattr(mnt_userns, acl, value, size);
-+ err = posix_acl_to_xattr(&init_user_ns, acl, value, size);
- if (err)
- goto out;
-
-@@ -614,13 +614,13 @@
- *
- * inode_operations::set_acl
+- err = posix_acl_to_xattr(mnt_userns, acl, value, size);
++ err = posix_acl_to_xattr(&init_user_ns, acl, value, size);
+ if (err < 0)
+ goto out;
+ }
+@@ -617,13 +617,13 @@
+ /*
+ * ntfs_set_acl - inode_operations::set_acl
*/
-int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
+int ntfs_set_acl(struct inode *inode,
@@ -281,7 +308,7 @@
struct inode *inode, int type, void *buffer,
size_t size)
{
-@@ -637,13 +637,13 @@
+@@ -642,13 +642,13 @@
if (!acl)
return -ENODATA;
@@ -297,27 +324,28 @@
struct inode *inode, int type, const void *value,
size_t size)
{
-@@ -653,23 +653,23 @@
- if (!(inode->i_sb->s_flags & SB_POSIXACL))
+@@ -660,24 +660,24 @@
return -EOPNOTSUPP;
+ }
- if (!inode_owner_or_capable(mnt_userns, inode))
+ if (!inode_owner_or_capable(inode))
return -EPERM;
- if (!value)
- return 0;
-
-- acl = posix_acl_from_xattr(mnt_userns, value, size);
-+ acl = posix_acl_from_xattr(&init_user_ns, value, size);
- if (IS_ERR(acl))
- return PTR_ERR(acl);
-
- if (acl) {
-- err = posix_acl_valid(mnt_userns, acl);
-+ err = posix_acl_valid(&init_user_ns, acl);
- if (err)
- goto release_and_out;
+ if (!value) {
+ acl = NULL;
+ } else {
+- acl = posix_acl_from_xattr(mnt_userns, value, size);
++ acl = posix_acl_from_xattr(&init_user_ns, value, size);
+ if (IS_ERR(acl))
+ return PTR_ERR(acl);
+
+ if (acl) {
+- err = posix_acl_valid(mnt_userns, acl);
++ err = posix_acl_valid(&init_user_ns, acl);
+ if (err)
+ goto release_and_out;
+ }
}
- err = ntfs_set_acl(mnt_userns, inode, acl, type);
@@ -325,16 +353,16 @@
release_and_out:
ntfs_posix_acl_release(acl);
-@@ -679,7 +679,7 @@
- /*
- * Initialize the ACLs of a new inode. Called from ntfs_create_inode.
+@@ -689,7 +689,7 @@
+ *
+ * Called from ntfs_create_inode().
*/
-int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode,
+int ntfs_init_acl(struct inode *inode,
struct inode *dir)
{
struct posix_acl *default_acl, *acl;
-@@ -691,7 +691,7 @@
+@@ -701,7 +701,7 @@
*/
inode->i_default_acl = NULL;
@@ -343,7 +371,7 @@
if (!default_acl || default_acl == ERR_PTR(-EOPNOTSUPP)) {
inode->i_mode &= ~current_umask();
-@@ -719,13 +719,13 @@
+@@ -729,13 +729,13 @@
}
if (default_acl)
@@ -359,16 +387,16 @@
1);
posix_acl_release(acl);
-@@ -742,7 +742,7 @@
- *
- * helper for 'ntfs3_setattr'
+@@ -750,7 +750,7 @@
+ /*
+ * ntfs_acl_chmod - Helper for ntfs3_setattr().
*/
-int ntfs_acl_chmod(struct user_namespace *mnt_userns, struct inode *inode)
+int ntfs_acl_chmod(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
-@@ -752,7 +752,7 @@
+@@ -760,7 +760,7 @@
if (S_ISLNK(inode->i_mode))
return -EOPNOTSUPP;
@@ -377,16 +405,16 @@
}
/*
-@@ -760,7 +760,7 @@
- *
- * inode_operations::permission
+@@ -766,7 +766,7 @@
+ /*
+ * ntfs_permission - inode_operations::permission
*/
-int ntfs_permission(struct user_namespace *mnt_userns, struct inode *inode,
+int ntfs_permission(struct inode *inode,
int mask)
{
if (ntfs_sb(inode->i_sb)->options.no_acs_rules) {
-@@ -768,7 +768,7 @@
+@@ -774,7 +774,7 @@
return 0;
}
@@ -395,7 +423,7 @@
}
/*
-@@ -882,7 +882,7 @@
+@@ -886,7 +886,7 @@
sizeof(XATTR_NAME_POSIX_ACL_DEFAULT)))) {
/* TODO: init_user_ns? */
err = ntfs_xattr_get_acl(
@@ -404,8 +432,8 @@
name_len == sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1
? ACL_TYPE_ACCESS
: ACL_TYPE_DEFAULT,
-@@ -903,7 +903,7 @@
- * inode_operations::setxattr
+@@ -905,7 +905,7 @@
+ * ntfs_setxattr - inode_operations::setxattr
*/
static noinline int ntfs_setxattr(const struct xattr_handler *handler,
- struct user_namespace *mnt_userns,
@@ -413,11 +441,10 @@
struct dentry *de, struct inode *inode,
const char *name, const void *value,
size_t size, int flags)
-@@ -1013,7 +1013,7 @@
+@@ -1015,6 +1015,6 @@
sizeof(XATTR_NAME_POSIX_ACL_DEFAULT)))) {
- /* TODO: init_user_ns? */
err = ntfs_xattr_set_acl(
-- &init_user_ns, inode,
+- mnt_userns, inode,
+ inode,
name_len == sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1
? ACL_TYPE_ACCESS
diff --git a/kernel-5.14-backport.patch b/kernel-5.14-backport.patch
index e8d60eb8b92d..c357004e0680 100644
--- a/kernel-5.14-backport.patch
+++ b/kernel-5.14-backport.patch
@@ -1,6 +1,6 @@
--- a/file.c
+++ b/file.c
-@@ -910,10 +910,10 @@
+@@ -1026,10 +1026,10 @@
size_t cp, tail = PAGE_SIZE - off;
page = pages[ip];
@@ -14,3 +14,40 @@
copied += cp;
bytes -= cp;
if (!bytes || !cp)
+
+--- a/ntfs_fs.h
++++ b/ntfs_fs.h
+@@ -809,7 +809,7 @@
+
+ /* globals from xattr.c */
+ #ifdef CONFIG_NTFS3_FS_POSIX_ACL
+-struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu);
++struct posix_acl *ntfs_get_acl(struct inode *inode, int type);
+ int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
+ struct posix_acl *acl, int type);
+ int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode,
+
+--- a/xattr.c
++++ b/xattr.c
+@@ -535,11 +535,8 @@
+ /*
+ * ntfs_get_acl - inode_operations::get_acl
+ */
+-struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu)
++struct posix_acl *ntfs_get_acl(struct inode *inode, int type)
+ {
+- if (rcu)
+- return ERR_PTR(-ECHILD);
+-
+ /* TODO: init_user_ns? */
+ return ntfs_get_acl_ex(&init_user_ns, inode, type, 0);
+ }
+@@ -638,7 +635,7 @@
+ return -EOPNOTSUPP;
+ }
+
+- acl = ntfs_get_acl(inode, type, false);
++ acl = ntfs_get_acl(inode, type);
+ if (IS_ERR(acl))
+ return PTR_ERR(acl);
+