@@ -458,10 +458,6 @@ static vm_fault_t gfs2_page_mkwrite(struct vm_fault *vmf)
458
458
459
459
sb_start_pagefault (inode -> i_sb );
460
460
461
- ret = gfs2_qa_get (ip );
462
- if (ret )
463
- goto out ;
464
-
465
461
gfs2_holder_init (ip -> i_gl , LM_ST_EXCLUSIVE , 0 , & gh );
466
462
ret = gfs2_glock_nq (& gh );
467
463
if (ret )
@@ -553,13 +549,11 @@ static vm_fault_t gfs2_page_mkwrite(struct vm_fault *vmf)
553
549
out_unlock :
554
550
gfs2_glock_dq (& gh );
555
551
out_uninit :
556
- gfs2_qa_put (ip );
557
552
gfs2_holder_uninit (& gh );
558
553
if (ret == 0 ) {
559
554
set_page_dirty (page );
560
555
wait_for_stable_page (page );
561
556
}
562
- out :
563
557
sb_end_pagefault (inode -> i_sb );
564
558
return block_page_mkwrite_return (ret );
565
559
}
@@ -860,18 +854,14 @@ static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
860
854
struct gfs2_inode * ip = GFS2_I (inode );
861
855
ssize_t ret ;
862
856
863
- ret = gfs2_qa_get (ip );
864
- if (ret )
865
- return ret ;
866
-
867
857
gfs2_size_hint (file , iocb -> ki_pos , iov_iter_count (from ));
868
858
869
859
if (iocb -> ki_flags & IOCB_APPEND ) {
870
860
struct gfs2_holder gh ;
871
861
872
862
ret = gfs2_glock_nq_init (ip -> i_gl , LM_ST_SHARED , 0 , & gh );
873
863
if (ret )
874
- goto out ;
864
+ return ret ;
875
865
gfs2_glock_dq_uninit (& gh );
876
866
}
877
867
@@ -929,8 +919,6 @@ static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
929
919
930
920
out_unlock :
931
921
inode_unlock (inode );
932
- out :
933
- gfs2_qa_put (ip );
934
922
return ret ;
935
923
}
936
924
@@ -1162,18 +1150,11 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t le
1162
1150
if (mode & FALLOC_FL_PUNCH_HOLE ) {
1163
1151
ret = __gfs2_punch_hole (file , offset , len );
1164
1152
} else {
1165
- ret = gfs2_qa_get (ip );
1166
- if (ret )
1167
- goto out_putw ;
1168
-
1169
1153
ret = __gfs2_fallocate (file , mode , offset , len );
1170
-
1171
1154
if (ret )
1172
1155
gfs2_rs_deltree (& ip -> i_res );
1173
- gfs2_qa_put (ip );
1174
1156
}
1175
1157
1176
- out_putw :
1177
1158
put_write_access (inode );
1178
1159
out_unlock :
1179
1160
gfs2_glock_dq (& gh );
@@ -1187,18 +1168,11 @@ static ssize_t gfs2_file_splice_write(struct pipe_inode_info *pipe,
1187
1168
struct file * out , loff_t * ppos ,
1188
1169
size_t len , unsigned int flags )
1189
1170
{
1190
- int error ;
1191
- struct gfs2_inode * ip = GFS2_I (out -> f_mapping -> host );
1192
1171
ssize_t ret ;
1193
1172
1194
- error = gfs2_qa_get (ip );
1195
- if (error )
1196
- return (ssize_t )error ;
1197
-
1198
1173
gfs2_size_hint (out , * ppos , len );
1199
1174
1200
1175
ret = iter_file_splice_write (pipe , out , ppos , len , flags );
1201
- gfs2_qa_put (ip );
1202
1176
return ret ;
1203
1177
}
1204
1178
0 commit comments