diff options
author | Sage Weil <sage@newdream.net> | 2011-03-03 13:44:35 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-03-04 12:25:09 -0800 |
commit | 455cec0abff563574cca432ced49f734117ca113 (patch) | |
tree | 594e8dd5ac6c48a97836e5ca1e6ce451e157f2a2 /fs/ceph/dir.c | |
parent | e00de341fdb76c955703b4438100f9933c452b7f (diff) | |
download | linux-455cec0abff563574cca432ced49f734117ca113.tar.gz linux-455cec0abff563574cca432ced49f734117ca113.tar.bz2 linux-455cec0abff563574cca432ced49f734117ca113.zip |
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: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |