summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-05-14 10:02:57 -0700
committerSage Weil <sage@newdream.net>2010-05-17 15:25:40 -0700
commit167c9e352deb7e25568c926c49c3eafad69cbe76 (patch)
treeb420c256e60accca30704059ab676e878cf49603 /fs/ceph/inode.c
parent85792d0dd6e7a7a18fba55c97e49871211b28fe0 (diff)
downloadop-kernel-dev-167c9e352deb7e25568c926c49c3eafad69cbe76.zip
op-kernel-dev-167c9e352deb7e25568c926c49c3eafad69cbe76.tar.gz
ceph: use common helper for aborted dir request invalidation
We invalidate I_COMPLETE and dentry leases in two places: on aborted mds request and on request replay. Use common helper to avoid duplicate code. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 1bcf98b..a81b8b6 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -941,21 +941,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
if (!rinfo->head->is_target && !rinfo->head->is_dentry) {
dout("fill_trace reply is empty!\n");
- if (rinfo->head->result == 0 && req->r_locked_dir) {
- struct ceph_inode_info *ci =
- ceph_inode(req->r_locked_dir);
- dout(" clearing %p complete (empty trace)\n",
- req->r_locked_dir);
- spin_lock(&req->r_locked_dir->i_lock);
- ci->i_ceph_flags &= ~CEPH_I_COMPLETE;
- ci->i_release_count++;
- spin_unlock(&req->r_locked_dir->i_lock);
-
- if (req->r_dentry)
- ceph_invalidate_dentry_lease(req->r_dentry);
- if (req->r_old_dentry)
- ceph_invalidate_dentry_lease(req->r_old_dentry);
- }
+ if (rinfo->head->result == 0 && req->r_locked_dir)
+ ceph_invalidate_dir_request(req);
return 0;
}
OpenPOWER on IntegriCloud