summaryrefslogtreecommitdiffstats
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-01-14 13:46:04 +0800
committerIlya Dryomov <idryomov@gmail.com>2015-02-19 13:31:39 +0300
commit38c48b5f0a7fd5ed9fdab6da4d208aa23cc5391a (patch)
treebd496db400c04a1f806e85774636e67186726698 /fs/ceph/dir.c
parent1f041a89b4f22cf2e701514f4b8f73a8b1e06a3e (diff)
downloadlinux-38c48b5f0a7fd5ed9fdab6da4d208aa23cc5391a.tar.gz
linux-38c48b5f0a7fd5ed9fdab6da4d208aa23cc5391a.tar.bz2
linux-38c48b5f0a7fd5ed9fdab6da4d208aa23cc5391a.zip
ceph: provide seperate {inode,file}_operations for snapdir
remove all unsupported operations from {inode,file}_operations. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index c241603764fd..709f3b98ca5c 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -26,8 +26,6 @@
* point by name.
*/
-const struct inode_operations ceph_dir_iops;
-const struct file_operations ceph_dir_fops;
const struct dentry_operations ceph_dentry_ops;
/*
@@ -1335,6 +1333,13 @@ const struct file_operations ceph_dir_fops = {
.fsync = ceph_dir_fsync,
};
+const struct file_operations ceph_snapdir_fops = {
+ .iterate = ceph_readdir,
+ .llseek = ceph_dir_llseek,
+ .open = ceph_open,
+ .release = ceph_release,
+};
+
const struct inode_operations ceph_dir_iops = {
.lookup = ceph_lookup,
.permission = ceph_permission,
@@ -1357,6 +1362,14 @@ const struct inode_operations ceph_dir_iops = {
.atomic_open = ceph_atomic_open,
};
+const struct inode_operations ceph_snapdir_iops = {
+ .lookup = ceph_lookup,
+ .permission = ceph_permission,
+ .getattr = ceph_getattr,
+ .mkdir = ceph_mkdir,
+ .rmdir = ceph_unlink,
+};
+
const struct dentry_operations ceph_dentry_ops = {
.d_revalidate = ceph_d_revalidate,
.d_release = ceph_d_release,