ocfs2: take ip_alloc_sem during entire truncate
Use of the alloc sem during truncate was too narrow - we want to protect the i_size change and page truncation against mmap now. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
This commit is contained in:
@@ -3631,8 +3631,6 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,
|
||||
|
||||
mlog_entry_void();
|
||||
|
||||
down_write(&OCFS2_I(inode)->ip_alloc_sem);
|
||||
|
||||
new_highest_cpos = ocfs2_clusters_for_bytes(osb->sb,
|
||||
i_size_read(inode));
|
||||
|
||||
@@ -3754,7 +3752,6 @@ start:
|
||||
goto start;
|
||||
|
||||
bail:
|
||||
up_write(&OCFS2_I(inode)->ip_alloc_sem);
|
||||
|
||||
ocfs2_schedule_truncate_log_flush(osb, 1);
|
||||
|
||||
|
Reference in New Issue
Block a user