From: Sage Weil Date: Thu, 3 Mar 2011 21:44:35 +0000 (-0800) Subject: ceph: no .snap inside of snapped namespace X-Git-Tag: Ubuntu-goldfish-3.4.0-4.27~4091^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=455cec0abff563574cca432ced49f734117ca113;p=mirror_ubuntu-zesty-kernel.git ceph: no .snap inside of snapped namespace Otherwise you can do things like # mkdir .snap/foo # cd .snap/foo/.snap # ls Signed-off-by: Sage Weil --- diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 196fd4c62db7..099a58615b90 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -496,6 +496,7 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, /* .snap dir? */ if (err == -ENOENT && + ceph_snap(parent) == CEPH_NOSNAP && strcmp(dentry->d_name.name, fsc->mount_options->snapdir_name) == 0) { struct inode *inode = ceph_get_snapdir(parent);