--- /dev/null
+From d979f3b0a1f0b5499ab85e68cdf02b56852918b6 Mon Sep 17 00:00:00 2001
+From: Steve French <smfrench@gmail.com>
+Date: Sat, 1 Feb 2014 23:27:18 -0600
+Subject: Add protocol specific operation for CIFS xattrs
+
+From: Steve French <smfrench@gmail.com>
+
+commit d979f3b0a1f0b5499ab85e68cdf02b56852918b6 upstream.
+
+Changeset 666753c3ef8fc88b0ddd5be4865d0aa66428ac35 added protocol
+operations for get/setxattr to avoid calling cifs operations
+on smb2/smb3 mounts for xattr operations and this changeset
+adds the calls to cifs specific protocol operations for xattrs
+(in order to reenable cifs support for xattrs which was
+temporarily disabled by the previous changeset. We do not
+have SMB2/SMB3 worker function for setting xattrs yet so
+this only enables it for cifs.
+
+CCing stable since without these two small changsets (its
+small coreq 666753c3ef8fc88b0ddd5be4865d0aa66428ac35 is
+also needed) calling getfattr/setfattr on smb2/smb3 mounts
+causes problems.
+
+Signed-off-by: Steve French <smfrench@gmail.com>
+Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/inode.c | 13 +++++++++----
+ fs/cifs/smb1ops.c | 4 ++++
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+--- a/fs/cifs/inode.c
++++ b/fs/cifs/inode.c
+@@ -518,10 +518,15 @@ static int cifs_sfu_mode(struct cifs_fat
+ return PTR_ERR(tlink);
+ tcon = tlink_tcon(tlink);
+
+- rc = CIFSSMBQAllEAs(xid, tcon, path, "SETFILEBITS",
+- ea_value, 4 /* size of buf */, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags &
+- CIFS_MOUNT_MAP_SPECIAL_CHR);
++ if (tcon->ses->server->ops->query_all_EAs == NULL) {
++ cifs_put_tlink(tlink);
++ return -EOPNOTSUPP;
++ }
++
++ rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path,
++ "SETFILEBITS", ea_value, 4 /* size of buf */,
++ cifs_sb->local_nls,
++ cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+ cifs_put_tlink(tlink);
+ if (rc < 0)
+ return (int)rc;
+--- a/fs/cifs/smb1ops.c
++++ b/fs/cifs/smb1ops.c
+@@ -1003,6 +1003,10 @@ struct smb_version_operations smb1_opera
+ .push_mand_locks = cifs_push_mandatory_locks,
+ .query_mf_symlink = open_query_close_cifs_symlink,
+ .is_read_op = cifs_is_read_op,
++#ifdef CONFIG_CIFS_XATTR
++ .query_all_EAs = CIFSSMBQAllEAs,
++ .set_EA = CIFSSMBSetEA,
++#endif /* CIFS_XATTR */
+ };
+
+ struct smb_version_values smb1_values = {
--- /dev/null
+From 666753c3ef8fc88b0ddd5be4865d0aa66428ac35 Mon Sep 17 00:00:00 2001
+From: Steve French <smfrench@gmail.com>
+Date: Sun, 26 Jan 2014 23:53:43 -0600
+Subject: CIFS: Fix SMB2 mounts so they don't try to set or get xattrs via cifs
+
+From: Steve French <smfrench@gmail.com>
+
+commit 666753c3ef8fc88b0ddd5be4865d0aa66428ac35 upstream.
+
+When mounting with smb2 (or smb2.1 or smb3) we need to check to make
+sure that attempts to query or set extended attributes do not
+attempt to send the request with the older cifs protocol instead
+(eventually we also need to add the support in SMB2
+to query/set extended attributes but this patch prevents us from
+using the wrong protocol for extended attribute operations).
+
+Signed-off-by: Steve French <smfrench@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/cifsglob.h | 6 ++++++
+ fs/cifs/xattr.c | 49 ++++++++++++++++++++++++++++++-------------------
+ 2 files changed, 36 insertions(+), 19 deletions(-)
+
+--- a/fs/cifs/cifsglob.h
++++ b/fs/cifs/cifsglob.h
+@@ -379,6 +379,12 @@ struct smb_version_operations {
+ char * (*create_lease_buf)(u8 *, u8);
+ /* parse lease context buffer and return oplock/epoch info */
+ __u8 (*parse_lease_buf)(void *, unsigned int *);
++ ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *,
++ const unsigned char *, const unsigned char *, char *,
++ size_t, const struct nls_table *, int);
++ int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *,
++ const char *, const void *, const __u16,
++ const struct nls_table *, int);
+ };
+
+ struct smb_version_values {
+--- a/fs/cifs/xattr.c
++++ b/fs/cifs/xattr.c
+@@ -82,9 +82,11 @@ int cifs_removexattr(struct dentry *dire
+ goto remove_ea_exit;
+
+ ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
+- rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
+- (__u16)0, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
++ if (pTcon->ses->server->ops->set_EA)
++ rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
++ full_path, ea_name, NULL, (__u16)0,
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
++ CIFS_MOUNT_MAP_SPECIAL_CHR);
+ }
+ remove_ea_exit:
+ kfree(full_path);
+@@ -149,18 +151,22 @@ int cifs_setxattr(struct dentry *direntr
+ cifs_dbg(FYI, "attempt to set cifs inode metadata\n");
+
+ ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
+- rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
+- (__u16)value_size, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
++ if (pTcon->ses->server->ops->set_EA)
++ rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
++ full_path, ea_name, ea_value, (__u16)value_size,
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
++ CIFS_MOUNT_MAP_SPECIAL_CHR);
+ } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)
+ == 0) {
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
+ goto set_ea_exit;
+
+ ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
+- rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
+- (__u16)value_size, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
++ if (pTcon->ses->server->ops->set_EA)
++ rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
++ full_path, ea_name, ea_value, (__u16)value_size,
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
++ CIFS_MOUNT_MAP_SPECIAL_CHR);
+ } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL,
+ strlen(CIFS_XATTR_CIFS_ACL)) == 0) {
+ #ifdef CONFIG_CIFS_ACL
+@@ -272,17 +278,21 @@ ssize_t cifs_getxattr(struct dentry *dir
+ /* revalidate/getattr then populate from inode */
+ } /* BB add else when above is implemented */
+ ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
+- rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
+- buf_size, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
++ if (pTcon->ses->server->ops->query_all_EAs)
++ rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
++ full_path, ea_name, ea_value, buf_size,
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
++ CIFS_MOUNT_MAP_SPECIAL_CHR);
+ } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) {
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
+ goto get_ea_exit;
+
+ ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
+- rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
+- buf_size, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
++ if (pTcon->ses->server->ops->query_all_EAs)
++ rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
++ full_path, ea_name, ea_value, buf_size,
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
++ CIFS_MOUNT_MAP_SPECIAL_CHR);
+ } else if (strncmp(ea_name, POSIX_ACL_XATTR_ACCESS,
+ strlen(POSIX_ACL_XATTR_ACCESS)) == 0) {
+ #ifdef CONFIG_CIFS_POSIX
+@@ -400,11 +410,12 @@ ssize_t cifs_listxattr(struct dentry *di
+ /* if proc/fs/cifs/streamstoxattr is set then
+ search server for EAs or streams to
+ returns as xattrs */
+- rc = CIFSSMBQAllEAs(xid, pTcon, full_path, NULL, data,
+- buf_size, cifs_sb->local_nls,
+- cifs_sb->mnt_cifs_flags &
+- CIFS_MOUNT_MAP_SPECIAL_CHR);
+
++ if (pTcon->ses->server->ops->query_all_EAs)
++ rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
++ full_path, NULL, data, buf_size,
++ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
++ CIFS_MOUNT_MAP_SPECIAL_CHR);
+ list_ea_exit:
+ kfree(full_path);
+ free_xid(xid);
--- /dev/null
+From 96c7a2ff21501691587e1ae969b83cbec8b78e08 Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Mon, 10 Feb 2014 14:25:41 -0800
+Subject: fs/file.c:fdtable: avoid triggering OOMs from alloc_fdmem
+
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+
+commit 96c7a2ff21501691587e1ae969b83cbec8b78e08 upstream.
+
+Recently due to a spike in connections per second memcached on 3
+separate boxes triggered the OOM killer from accept. At the time the
+OOM killer was triggered there was 4GB out of 36GB free in zone 1. The
+problem was that alloc_fdtable was allocating an order 3 page (32KiB) to
+hold a bitmap, and there was sufficient fragmentation that the largest
+page available was 8KiB.
+
+I find the logic that PAGE_ALLOC_COSTLY_ORDER can't fail pretty dubious
+but I do agree that order 3 allocations are very likely to succeed.
+
+There are always pathologies where order > 0 allocations can fail when
+there are copious amounts of free memory available. Using the pigeon
+hole principle it is easy to show that it requires 1 page more than 50%
+of the pages being free to guarantee an order 1 (8KiB) allocation will
+succeed, 1 page more than 75% of the pages being free to guarantee an
+order 2 (16KiB) allocation will succeed and 1 page more than 87.5% of
+the pages being free to guarantee an order 3 allocate will succeed.
+
+A server churning memory with a lot of small requests and replies like
+memcached is a common case that if anything can will skew the odds
+against large pages being available.
+
+Therefore let's not give external applications a practical way to kill
+linux server applications, and specify __GFP_NORETRY to the kmalloc in
+alloc_fdmem. Unless I am misreading the code and by the time the code
+reaches should_alloc_retry in __alloc_pages_slowpath (where
+__GFP_NORETRY becomes signification). We have already tried everything
+reasonable to allocate a page and the only thing left to do is wait. So
+not waiting and falling back to vmalloc immediately seems like the
+reasonable thing to do even if there wasn't a chance of triggering the
+OOM killer.
+
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+Cc: Eric Dumazet <eric.dumazet@gmail.com>
+Acked-by: David Rientjes <rientjes@google.com>
+Cc: Cong Wang <cwang@twopensource.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/file.c
++++ b/fs/file.c
+@@ -34,7 +34,7 @@ static void *alloc_fdmem(size_t size)
+ * vmalloc() if the allocation size will be considered "large" by the VM.
+ */
+ if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) {
+- void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN);
++ void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY);
+ if (data != NULL)
+ return data;
+ }
--- /dev/null
+From a0b54adda3fe4b4cc6d28f2a9217cd35d1aa888c Mon Sep 17 00:00:00 2001
+From: Rafael Aquini <aquini@redhat.com>
+Date: Mon, 10 Feb 2014 14:25:48 -0800
+Subject: mm: fix page leak at nfs_symlink()
+
+From: Rafael Aquini <aquini@redhat.com>
+
+commit a0b54adda3fe4b4cc6d28f2a9217cd35d1aa888c upstream.
+
+Changes in commit a0b8cab3b9b2 ("mm: remove lru parameter from
+__pagevec_lru_add and remove parts of pagevec API") have introduced a
+call to add_to_page_cache_lru() which causes a leak in nfs_symlink() as
+now the page gets an extra refcount that is not dropped.
+
+Jan Stancek observed and reported the leak effect while running test8
+from Connectathon Testsuite. After several iterations over the test
+case, which creates several symlinks on a NFS mountpoint, the test
+system was quickly getting into an out-of-memory scenario.
+
+This patch fixes the page leak by dropping that extra refcount
+add_to_page_cache_lru() is grabbing.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Signed-off-by: Rafael Aquini <aquini@redhat.com>
+Acked-by: Mel Gorman <mgorman@suse.de>
+Acked-by: Rik van Riel <riel@redhat.com>
+Cc: Jeff Layton <jlayton@redhat.com>
+Cc: Trond Myklebust <trond.myklebust@primarydata.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/dir.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/fs/nfs/dir.c
++++ b/fs/nfs/dir.c
+@@ -1852,6 +1852,11 @@ int nfs_symlink(struct inode *dir, struc
+ GFP_KERNEL)) {
+ SetPageUptodate(page);
+ unlock_page(page);
++ /*
++ * add_to_page_cache_lru() grabs an extra page refcount.
++ * Drop it here to avoid leaking this page later.
++ */
++ page_cache_release(page);
+ } else
+ __free_page(page);
+
--- /dev/null
+From 8d547ff4ac5927245e0833ac18528f939da0ee0e Mon Sep 17 00:00:00 2001
+From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+Date: Mon, 10 Feb 2014 14:25:50 -0800
+Subject: mm/memory-failure.c: move refcount only in !MF_COUNT_INCREASED
+
+From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+
+commit 8d547ff4ac5927245e0833ac18528f939da0ee0e upstream.
+
+mce-test detected a test failure when injecting error to a thp tail
+page. This is because we take page refcount of the tail page in
+madvise_hwpoison() while the fix in commit a3e0f9e47d5e
+("mm/memory-failure.c: transfer page count from head page to tail page
+after split thp") assumes that we always take refcount on the head page.
+
+When a real memory error happens we take refcount on the head page where
+memory_failure() is called without MF_COUNT_INCREASED set, so it seems
+to me that testing memory error on thp tail page using madvise makes
+little sense.
+
+This patch cancels moving refcount in !MF_COUNT_INCREASED for valid
+testing.
+
+[akpm@linux-foundation.org: s/&&/&/]
+Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+Cc: Andi Kleen <andi@firstfloor.org>
+Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
+Cc: Chen Gong <gong.chen@linux.intel.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/memory-failure.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/mm/memory-failure.c
++++ b/mm/memory-failure.c
+@@ -945,8 +945,10 @@ static int hwpoison_user_mappings(struct
+ * to it. Similarly, page lock is shifted.
+ */
+ if (hpage != p) {
+- put_page(hpage);
+- get_page(p);
++ if (!(flags & MF_COUNT_INCREASED)) {
++ put_page(hpage);
++ get_page(p);
++ }
+ lock_page(p);
+ unlock_page(hpage);
+ *hpagep = p;
--- /dev/null
+From 83e3bc23ef9ce7c03b7b4e5d3d790246ea59db3e Mon Sep 17 00:00:00 2001
+From: Steve French <smfrench@gmail.com>
+Date: Sun, 2 Feb 2014 23:31:47 -0600
+Subject: retrieving CIFS ACLs when mounted with SMB2 fails dropping session
+
+From: Steve French <smfrench@gmail.com>
+
+commit 83e3bc23ef9ce7c03b7b4e5d3d790246ea59db3e upstream.
+
+The get/set ACL xattr support for CIFS ACLs attempts to send old
+cifs dialect protocol requests even when mounted with SMB2 or later
+dialects. Sending cifs requests on an smb2 session causes problems -
+the server drops the session due to the illegal request.
+
+This patch makes CIFS ACL operations protocol specific to fix that.
+
+Attempting to query/set CIFS ACLs for SMB2 will now return
+EOPNOTSUPP (until we add worker routines for sending query
+ACL requests via SMB2) instead of sending invalid (cifs)
+requests.
+
+A separate followon patch will be needed to fix cifs_acl_to_fattr
+(which takes a cifs specific u16 fid so can't be abstracted
+to work with SMB2 until that is changed) and will be needed
+to fix mount problems when "cifsacl" is specified on mount
+with e.g. vers=2.1
+
+Signed-off-by: Steve French <smfrench@gmail.com>
+Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/cifsacl.c | 28 ++++++++++++++++++++++++----
+ fs/cifs/cifsglob.h | 4 ++++
+ fs/cifs/smb1ops.c | 4 ++++
+ fs/cifs/xattr.c | 15 +++++++++++----
+ 4 files changed, 43 insertions(+), 8 deletions(-)
+
+--- a/fs/cifs/cifsacl.c
++++ b/fs/cifs/cifsacl.c
+@@ -1027,15 +1027,30 @@ id_mode_to_cifs_acl(struct inode *inode,
+ __u32 secdesclen = 0;
+ struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */
+ struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */
++ struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
++ struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
++ struct cifs_tcon *tcon;
++
++ if (IS_ERR(tlink))
++ return PTR_ERR(tlink);
++ tcon = tlink_tcon(tlink);
+
+ cifs_dbg(NOISY, "set ACL from mode for %s\n", path);
+
+ /* Get the security descriptor */
+- pntsd = get_cifs_acl(CIFS_SB(inode->i_sb), inode, path, &secdesclen);
++
++ if (tcon->ses->server->ops->get_acl == NULL) {
++ cifs_put_tlink(tlink);
++ return -EOPNOTSUPP;
++ }
++
++ pntsd = tcon->ses->server->ops->get_acl(cifs_sb, inode, path,
++ &secdesclen);
+ if (IS_ERR(pntsd)) {
+ rc = PTR_ERR(pntsd);
+ cifs_dbg(VFS, "%s: error %d getting sec desc\n", __func__, rc);
+- goto out;
++ cifs_put_tlink(tlink);
++ return rc;
+ }
+
+ /*
+@@ -1048,6 +1063,7 @@ id_mode_to_cifs_acl(struct inode *inode,
+ pnntsd = kmalloc(secdesclen, GFP_KERNEL);
+ if (!pnntsd) {
+ kfree(pntsd);
++ cifs_put_tlink(tlink);
+ return -ENOMEM;
+ }
+
+@@ -1056,14 +1072,18 @@ id_mode_to_cifs_acl(struct inode *inode,
+
+ cifs_dbg(NOISY, "build_sec_desc rc: %d\n", rc);
+
++ if (tcon->ses->server->ops->set_acl == NULL)
++ rc = -EOPNOTSUPP;
++
+ if (!rc) {
+ /* Set the security descriptor */
+- rc = set_cifs_acl(pnntsd, secdesclen, inode, path, aclflag);
++ rc = tcon->ses->server->ops->set_acl(pnntsd, secdesclen, inode,
++ path, aclflag);
+ cifs_dbg(NOISY, "set_cifs_acl rc: %d\n", rc);
+ }
++ cifs_put_tlink(tlink);
+
+ kfree(pnntsd);
+ kfree(pntsd);
+-out:
+ return rc;
+ }
+--- a/fs/cifs/cifsglob.h
++++ b/fs/cifs/cifsglob.h
+@@ -385,6 +385,10 @@ struct smb_version_operations {
+ int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *,
+ const char *, const void *, const __u16,
+ const struct nls_table *, int);
++ struct cifs_ntsd * (*get_acl)(struct cifs_sb_info *, struct inode *,
++ const char *, u32 *);
++ int (*set_acl)(struct cifs_ntsd *, __u32, struct inode *, const char *,
++ int);
+ };
+
+ struct smb_version_values {
+--- a/fs/cifs/smb1ops.c
++++ b/fs/cifs/smb1ops.c
+@@ -1007,6 +1007,10 @@ struct smb_version_operations smb1_opera
+ .query_all_EAs = CIFSSMBQAllEAs,
+ .set_EA = CIFSSMBSetEA,
+ #endif /* CIFS_XATTR */
++#ifdef CONFIG_CIFS_ACL
++ .get_acl = get_cifs_acl,
++ .set_acl = set_cifs_acl,
++#endif /* CIFS_ACL */
+ };
+
+ struct smb_version_values smb1_values = {
+--- a/fs/cifs/xattr.c
++++ b/fs/cifs/xattr.c
+@@ -176,8 +176,12 @@ int cifs_setxattr(struct dentry *direntr
+ rc = -ENOMEM;
+ } else {
+ memcpy(pacl, ea_value, value_size);
+- rc = set_cifs_acl(pacl, value_size,
+- direntry->d_inode, full_path, CIFS_ACL_DACL);
++ if (pTcon->ses->server->ops->set_acl)
++ rc = pTcon->ses->server->ops->set_acl(pacl,
++ value_size, direntry->d_inode,
++ full_path, CIFS_ACL_DACL);
++ else
++ rc = -EOPNOTSUPP;
+ if (rc == 0) /* force revalidate of the inode */
+ CIFS_I(direntry->d_inode)->time = 0;
+ kfree(pacl);
+@@ -323,8 +327,11 @@ ssize_t cifs_getxattr(struct dentry *dir
+ u32 acllen;
+ struct cifs_ntsd *pacl;
+
+- pacl = get_cifs_acl(cifs_sb, direntry->d_inode,
+- full_path, &acllen);
++ if (pTcon->ses->server->ops->get_acl == NULL)
++ goto get_ea_exit; /* rc already EOPNOTSUPP */
++
++ pacl = pTcon->ses->server->ops->get_acl(cifs_sb,
++ direntry->d_inode, full_path, &acllen);
+ if (IS_ERR(pacl)) {
+ rc = PTR_ERR(pacl);
+ cifs_dbg(VFS, "%s: error %zd getting sec desc\n",
xen-properly-account-for-_page_numa-during-xen-pte-translations.patch
xen-blkfront-handle-backend-closed-without-closing.patch
+fs-file.c-fdtable-avoid-triggering-ooms-from-alloc_fdmem.patch
+mm-fix-page-leak-at-nfs_symlink.patch
+mm-memory-failure.c-move-refcount-only-in-mf_count_increased.patch
+cifs-fix-smb2-mounts-so-they-don-t-try-to-set-or-get-xattrs-via-cifs.patch
+add-protocol-specific-operation-for-cifs-xattrs.patch
+retrieving-cifs-acls-when-mounted-with-smb2-fails-dropping-session.patch