All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "Btrfs: disable xattr operations on subvolume directories" has been added to the 4.9-stable tree
@ 2017-01-30  9:07 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-30  9:07 UTC (permalink / raw)
  To: osandov, agruenba, clm, dsterba, gregkh, lists; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    Btrfs: disable xattr operations on subvolume directories

to the 4.9-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:
     btrfs-disable-xattr-operations-on-subvolume-directories.patch
and it can be found in the queue-4.9 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 1fdf41941b8010691679638f8d0c8d08cfee7726 Mon Sep 17 00:00:00 2001
From: Omar Sandoval <osandov@fb.com>
Date: Wed, 25 Jan 2017 17:06:39 -0800
Subject: Btrfs: disable xattr operations on subvolume directories

From: Omar Sandoval <osandov@fb.com>

commit 1fdf41941b8010691679638f8d0c8d08cfee7726 upstream.

When you snapshot a subvolume containing a subvolume, you get a
placeholder directory where the subvolume would be. These directory
inodes have ->i_ops set to btrfs_dir_ro_inode_operations. Previously,
these i_ops didn't include the xattr operation callbacks. The conversion
to xattr_handlers missed this case, leading to bogus attempts to set
xattrs on these inodes. This manifested itself as failures when running
delayed inodes.

To fix this, clear IOP_XATTR in ->i_opflags on these inodes.

Fixes: 6c6ef9f26e59 ("xattr: Stop calling {get,set,remove}xattr inode operations")
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Reported-by: Chris Murphy <lists@colorremedies.com>
Tested-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/btrfs/inode.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5679,6 +5679,7 @@ static struct inode *new_simple_dir(stru
 
 	inode->i_ino = BTRFS_EMPTY_SUBVOL_DIR_OBJECTID;
 	inode->i_op = &btrfs_dir_ro_inode_operations;
+	inode->i_opflags &= ~IOP_XATTR;
 	inode->i_fop = &simple_dir_operations;
 	inode->i_mode = S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO;
 	inode->i_mtime = current_time(inode);


Patches currently in stable-queue which might be from osandov@fb.com are

queue-4.9/btrfs-remove-get-set-_acl-from-btrfs_dir_ro_inode_operations.patch
queue-4.9/btrfs-disable-xattr-operations-on-subvolume-directories.patch
queue-4.9/btrfs-remove-old-tree_root-case-in-btrfs_read_locked_inode.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-30  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-30  9:07 Patch "Btrfs: disable xattr operations on subvolume directories" has been added to the 4.9-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.