Searched hist:d3c51ae1 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/ceph/ |
H A D | inode.c | d3c51ae1 Mon Mar 01 06:38:01 CST 2021 Jeff Layton <jlayton@kernel.org> ceph: don't clobber i_snap_caps on non-I_NEW inode
We want the snapdir to mirror the non-snapped directory's attributes for most things, but i_snap_caps represents the caps granted on the snapshot directory by the MDS itself. A misbehaving MDS could issue different caps for the snapdir and we lose them here.
Only reset i_snap_caps when the inode is I_NEW. Also, move the setting of i_op and i_fop inside the if block since they should never change anyway.
Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|