summaryrefslogtreecommitdiff
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-03-01 15:38:01 +0300
committerIlya Dryomov <idryomov@gmail.com>2021-04-28 00:52:22 +0300
commitd3c51ae1b8cce5bdaf91a1ce32b33cf5626075dc (patch)
tree47f0721d76ea133f42adb216f90d171d1aa79dcc /fs/ceph/dir.c
parentfcaddb1d851bf69c94b3046227341d9684e276b1 (diff)
downloadlinux-d3c51ae1b8cce5bdaf91a1ce32b33cf5626075dc.tar.xz
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>
Diffstat (limited to 'fs/ceph/dir.c')
0 files changed, 0 insertions, 0 deletions