diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dlmglue.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index f518d1bee30a..79db0557df88 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -3495,11 +3495,11 @@ out: | |||
3495 | return UNBLOCK_CONTINUE; | 3495 | return UNBLOCK_CONTINUE; |
3496 | } | 3496 | } |
3497 | 3497 | ||
3498 | static int ocfs2_check_meta_downconvert(struct ocfs2_lock_res *lockres, | 3498 | static int ocfs2_ci_checkpointed(struct ocfs2_caching_info *ci, |
3499 | int new_level) | 3499 | struct ocfs2_lock_res *lockres, |
3500 | int new_level) | ||
3500 | { | 3501 | { |
3501 | struct inode *inode = ocfs2_lock_res_inode(lockres); | 3502 | int checkpointed = ocfs2_ci_fully_checkpointed(ci); |
3502 | int checkpointed = ocfs2_ci_fully_checkpointed(INODE_CACHE(inode)); | ||
3503 | 3503 | ||
3504 | BUG_ON(new_level != DLM_LOCK_NL && new_level != DLM_LOCK_PR); | 3504 | BUG_ON(new_level != DLM_LOCK_NL && new_level != DLM_LOCK_PR); |
3505 | BUG_ON(lockres->l_level != DLM_LOCK_EX && !checkpointed); | 3505 | BUG_ON(lockres->l_level != DLM_LOCK_EX && !checkpointed); |
@@ -3507,10 +3507,18 @@ static int ocfs2_check_meta_downconvert(struct ocfs2_lock_res *lockres, | |||
3507 | if (checkpointed) | 3507 | if (checkpointed) |
3508 | return 1; | 3508 | return 1; |
3509 | 3509 | ||
3510 | ocfs2_start_checkpoint(OCFS2_SB(inode->i_sb)); | 3510 | ocfs2_start_checkpoint(OCFS2_SB(ocfs2_metadata_cache_get_super(ci))); |
3511 | return 0; | 3511 | return 0; |
3512 | } | 3512 | } |
3513 | 3513 | ||
3514 | static int ocfs2_check_meta_downconvert(struct ocfs2_lock_res *lockres, | ||
3515 | int new_level) | ||
3516 | { | ||
3517 | struct inode *inode = ocfs2_lock_res_inode(lockres); | ||
3518 | |||
3519 | return ocfs2_ci_checkpointed(INODE_CACHE(inode), lockres, new_level); | ||
3520 | } | ||
3521 | |||
3514 | static void ocfs2_set_meta_lvb(struct ocfs2_lock_res *lockres) | 3522 | static void ocfs2_set_meta_lvb(struct ocfs2_lock_res *lockres) |
3515 | { | 3523 | { |
3516 | struct inode *inode = ocfs2_lock_res_inode(lockres); | 3524 | struct inode *inode = ocfs2_lock_res_inode(lockres); |