diff options
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/dir.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 3eeb97661262..98954003a8d3 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -1094,42 +1094,19 @@ static int ceph_snapdir_d_revalidate(struct dentry *dentry, | |||
1094 | /* | 1094 | /* |
1095 | * Set/clear/test dir complete flag on the dir's dentry. | 1095 | * Set/clear/test dir complete flag on the dir's dentry. |
1096 | */ | 1096 | */ |
1097 | static struct dentry * __d_find_any_alias(struct inode *inode) | ||
1098 | { | ||
1099 | struct dentry *alias; | ||
1100 | |||
1101 | if (list_empty(&inode->i_dentry)) | ||
1102 | return NULL; | ||
1103 | alias = list_first_entry(&inode->i_dentry, struct dentry, d_alias); | ||
1104 | return alias; | ||
1105 | } | ||
1106 | |||
1107 | void ceph_dir_set_complete(struct inode *inode) | 1097 | void ceph_dir_set_complete(struct inode *inode) |
1108 | { | 1098 | { |
1109 | struct dentry *dentry = __d_find_any_alias(inode); | 1099 | /* not yet implemented */ |
1110 | |||
1111 | if (dentry && ceph_dentry(dentry)) { | ||
1112 | dout(" marking %p (%p) complete\n", inode, dentry); | ||
1113 | set_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); | ||
1114 | } | ||
1115 | } | 1100 | } |
1116 | 1101 | ||
1117 | void ceph_dir_clear_complete(struct inode *inode) | 1102 | void ceph_dir_clear_complete(struct inode *inode) |
1118 | { | 1103 | { |
1119 | struct dentry *dentry = __d_find_any_alias(inode); | 1104 | /* not yet implemented */ |
1120 | |||
1121 | if (dentry && ceph_dentry(dentry)) { | ||
1122 | dout(" marking %p (%p) NOT complete\n", inode, dentry); | ||
1123 | clear_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); | ||
1124 | } | ||
1125 | } | 1105 | } |
1126 | 1106 | ||
1127 | bool ceph_dir_test_complete(struct inode *inode) | 1107 | bool ceph_dir_test_complete(struct inode *inode) |
1128 | { | 1108 | { |
1129 | struct dentry *dentry = __d_find_any_alias(inode); | 1109 | /* not yet implemented */ |
1130 | |||
1131 | if (dentry && ceph_dentry(dentry)) | ||
1132 | return test_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); | ||
1133 | return false; | 1110 | return false; |
1134 | } | 1111 | } |
1135 | 1112 | ||