* Patch "ovl: take mnt_want_write() for removing impure xattr" has been added to the 4.14-stable tree
@ 2018-02-15 14:37 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-15 14:37 UTC (permalink / raw)
To: amir73il, gregkh, mszeredi; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ovl: take mnt_want_write() for removing impure xattr
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ovl-take-mnt_want_write-for-removing-impure-xattr.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From a5a927a7c82e28ea76599dee4019c41e372c911f Mon Sep 17 00:00:00 2001
From: Amir Goldstein <amir73il@gmail.com>
Date: Wed, 3 Jan 2018 18:54:42 +0200
Subject: ovl: take mnt_want_write() for removing impure xattr
From: Amir Goldstein <amir73il@gmail.com>
commit a5a927a7c82e28ea76599dee4019c41e372c911f upstream.
The optimization in ovl_cache_get_impure() that tries to remove an
unneeded "impure" xattr needs to take mnt_want_write() on upper fs.
Fixes: 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/overlayfs/readdir.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -575,8 +575,15 @@ static struct ovl_dir_cache *ovl_cache_g
return ERR_PTR(res);
}
if (list_empty(&cache->entries)) {
- /* Good oportunity to get rid of an unnecessary "impure" flag */
- ovl_do_removexattr(ovl_dentry_upper(dentry), OVL_XATTR_IMPURE);
+ /*
+ * A good opportunity to get rid of an unneeded "impure" flag.
+ * Removing the "impure" xattr is best effort.
+ */
+ if (!ovl_want_write(dentry)) {
+ ovl_do_removexattr(ovl_dentry_upper(dentry),
+ OVL_XATTR_IMPURE);
+ ovl_drop_write(dentry);
+ }
ovl_clear_flag(OVL_IMPURE, d_inode(dentry));
kfree(cache);
return NULL;
Patches currently in stable-queue which might be from amir73il@gmail.com are
queue-4.14/ovl-take-mnt_want_write-for-removing-impure-xattr.patch
queue-4.14/ovl-fix-failure-to-fsync-lower-dir.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-15 14:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 14:37 Patch "ovl: take mnt_want_write() for removing impure xattr" has been added to the 4.14-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.