Skip to content

Commit

Permalink
ceph: no .snap inside of snapped namespace
Browse files Browse the repository at this point in the history
Otherwise you can do things like

# mkdir .snap/foo
# cd .snap/foo/.snap
# ls
<badness>

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Mar 4, 2011
1 parent e00de34 commit 455cec0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ceph/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 455cec0

Please sign in to comment.