File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1038,8 +1038,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
1038
1038
if (WARN_ON (!attach || !attach -> dmabuf ))
1039
1039
return ERR_PTR (- EINVAL );
1040
1040
1041
- if (dma_buf_attachment_is_dynamic (attach ))
1042
- dma_resv_assert_held (attach -> dmabuf -> resv );
1041
+ dma_resv_assert_held (attach -> dmabuf -> resv );
1043
1042
1044
1043
if (attach -> sgt ) {
1045
1044
/*
@@ -1054,7 +1053,6 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
1054
1053
}
1055
1054
1056
1055
if (dma_buf_is_dynamic (attach -> dmabuf )) {
1057
- dma_resv_assert_held (attach -> dmabuf -> resv );
1058
1056
if (!IS_ENABLED (CONFIG_DMABUF_MOVE_NOTIFY )) {
1059
1057
r = attach -> dmabuf -> ops -> pin (attach );
1060
1058
if (r )
@@ -1143,15 +1141,11 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
1143
1141
if (WARN_ON (!attach || !attach -> dmabuf || !sg_table ))
1144
1142
return ;
1145
1143
1146
- if (dma_buf_attachment_is_dynamic (attach ))
1147
- dma_resv_assert_held (attach -> dmabuf -> resv );
1144
+ dma_resv_assert_held (attach -> dmabuf -> resv );
1148
1145
1149
1146
if (attach -> sgt == sg_table )
1150
1147
return ;
1151
1148
1152
- if (dma_buf_is_dynamic (attach -> dmabuf ))
1153
- dma_resv_assert_held (attach -> dmabuf -> resv );
1154
-
1155
1149
__unmap_dma_buf (attach , sg_table , direction );
1156
1150
1157
1151
if (dma_buf_is_dynamic (attach -> dmabuf ) &&
You can’t perform that action at this time.
0 commit comments