Commit 455cec0a authored by Sage Weil's avatar Sage Weil

ceph: no .snap inside of snapped namespace

Otherwise you can do things like

# mkdir .snap/foo
# cd .snap/foo/.snap
# ls
<badness>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent e00de341
...@@ -496,6 +496,7 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, ...@@ -496,6 +496,7 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req,
/* .snap dir? */ /* .snap dir? */
if (err == -ENOENT && if (err == -ENOENT &&
ceph_snap(parent) == CEPH_NOSNAP &&
strcmp(dentry->d_name.name, strcmp(dentry->d_name.name,
fsc->mount_options->snapdir_name) == 0) { fsc->mount_options->snapdir_name) == 0) {
struct inode *inode = ceph_get_snapdir(parent); struct inode *inode = ceph_get_snapdir(parent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment