From: Greg Kroah-Hartman Date: Tue, 12 Jul 2016 02:33:45 +0000 (-0700) Subject: 4.6-stable patches X-Git-Tag: v4.6.5~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2068143067f56e6204fb7b66ac0b642df3ced26;p=thirdparty%2Fkernel%2Fstable-queue.git 4.6-stable patches added patches: mm-export-migrate_page_move_mapping-and-migrate_page_copy.patch posix_acl-add-set_posix_acl.patch --- diff --git a/queue-4.6/mm-export-migrate_page_move_mapping-and-migrate_page_copy.patch b/queue-4.6/mm-export-migrate_page_move_mapping-and-migrate_page_copy.patch new file mode 100644 index 00000000000..8dfdfc04af6 --- /dev/null +++ b/queue-4.6/mm-export-migrate_page_move_mapping-and-migrate_page_copy.patch @@ -0,0 +1,38 @@ +From 1118dce773d84f39ebd51a9fe7261f9169cb056e Mon Sep 17 00:00:00 2001 +From: Richard Weinberger +Date: Thu, 16 Jun 2016 23:26:14 +0200 +Subject: mm: Export migrate_page_move_mapping and migrate_page_copy + +From: Richard Weinberger + +commit 1118dce773d84f39ebd51a9fe7261f9169cb056e upstream. + +Export these symbols such that UBIFS can implement +->migratepage. + +Signed-off-by: Richard Weinberger +Acked-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + mm/migrate.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/mm/migrate.c ++++ b/mm/migrate.c +@@ -431,6 +431,7 @@ int migrate_page_move_mapping(struct add + + return MIGRATEPAGE_SUCCESS; + } ++EXPORT_SYMBOL(migrate_page_move_mapping); + + /* + * The expected number of remaining references is the same as that +@@ -586,6 +587,7 @@ void migrate_page_copy(struct page *newp + + mem_cgroup_migrate(page, newpage); + } ++EXPORT_SYMBOL(migrate_page_copy); + + /************************************************************ + * Migration functions diff --git a/queue-4.6/posix_acl-add-set_posix_acl.patch b/queue-4.6/posix_acl-add-set_posix_acl.patch new file mode 100644 index 00000000000..3f86e37567b --- /dev/null +++ b/queue-4.6/posix_acl-add-set_posix_acl.patch @@ -0,0 +1,89 @@ +From 485e71e8fb6356c08c7fc6bcce4bf02c9a9a663f Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Wed, 22 Jun 2016 23:57:25 +0200 +Subject: posix_acl: Add set_posix_acl + +From: Andreas Gruenbacher + +commit 485e71e8fb6356c08c7fc6bcce4bf02c9a9a663f upstream. + +Factor out part of posix_acl_xattr_set into a common function that takes +a posix_acl, which nfsd can also call. + +The prototype already exists in include/linux/posix_acl.h. + +Signed-off-by: Andreas Gruenbacher +Cc: Christoph Hellwig +Cc: Al Viro +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + fs/posix_acl.c | 42 +++++++++++++++++++++++------------------- + 1 file changed, 23 insertions(+), 19 deletions(-) + +--- a/fs/posix_acl.c ++++ b/fs/posix_acl.c +@@ -786,39 +786,43 @@ posix_acl_xattr_get(const struct xattr_h + return error; + } + +-static int +-posix_acl_xattr_set(const struct xattr_handler *handler, +- struct dentry *dentry, const char *name, +- const void *value, size_t size, int flags) ++int ++set_posix_acl(struct inode *inode, int type, struct posix_acl *acl) + { +- struct inode *inode = d_backing_inode(dentry); +- struct posix_acl *acl = NULL; +- int ret; +- + if (!IS_POSIXACL(inode)) + return -EOPNOTSUPP; + if (!inode->i_op->set_acl) + return -EOPNOTSUPP; + +- if (handler->flags == ACL_TYPE_DEFAULT && !S_ISDIR(inode->i_mode)) +- return value ? -EACCES : 0; ++ if (type == ACL_TYPE_DEFAULT && !S_ISDIR(inode->i_mode)) ++ return acl ? -EACCES : 0; + if (!inode_owner_or_capable(inode)) + return -EPERM; + ++ if (acl) { ++ int ret = posix_acl_valid(acl); ++ if (ret) ++ return ret; ++ } ++ return inode->i_op->set_acl(inode, acl, type); ++} ++EXPORT_SYMBOL(set_posix_acl); ++ ++static int ++posix_acl_xattr_set(const struct xattr_handler *handler, ++ struct dentry *dentry, const char *name, ++ const void *value, size_t size, int flags) ++{ ++ struct inode *inode = d_backing_inode(dentry); ++ struct posix_acl *acl = NULL; ++ int ret; ++ + if (value) { + acl = posix_acl_from_xattr(&init_user_ns, value, size); + if (IS_ERR(acl)) + return PTR_ERR(acl); +- +- if (acl) { +- ret = posix_acl_valid(acl); +- if (ret) +- goto out; +- } + } +- +- ret = inode->i_op->set_acl(inode, acl, handler->flags); +-out: ++ ret = set_posix_acl(inode, handler->flags, acl); + posix_acl_release(acl); + return ret; + } diff --git a/queue-4.6/series b/queue-4.6/series index 20f4243fad5..4b42a123ab1 100644 --- a/queue-4.6/series +++ b/queue-4.6/series @@ -47,6 +47,7 @@ sd-fix-rw_max-for-devices-that-report-an-optimal-xfer-size.patch nfsd4-rpc-move-backchannel-create-logic-into-rpc-code.patch nfsd-always-lock-state-exclusively.patch nfsd-extend-the-mutex-holding-region-around-in-nfsd4_process_open2.patch +posix_acl-add-set_posix_acl.patch nfsd-check-permissions-when-setting-acls.patch pnfs_nfs-fix-_cancel_empty_pagelist.patch nfs-fix-a-double-page-unlock.patch @@ -63,4 +64,5 @@ arm-dts-sun6i-yones-toptech-bs1078-v2-drop-constraints-on-dc1sw-regulator.patch arm-dts-sun6i-primo81-drop-constraints-on-dc1sw-regulator.patch mips-kvm-fix-modular-kvm-under-qemu.patch irqchip-mips-gic-fix-irqs-in-gic_dev_domain.patch +mm-export-migrate_page_move_mapping-and-migrate_page_copy.patch ubifs-implement-migratepage.patch