File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1228,21 +1228,22 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
1228
1228
ssize_t ret ;
1229
1229
int err ;
1230
1230
1231
- err = check_write_restriction (inode );
1232
- if (err )
1233
- return err ;
1234
-
1235
- if (is_compressed (ni ) && (iocb -> ki_flags & IOCB_DIRECT )) {
1236
- ntfs_inode_warn (inode , "direct i/o + compressed not supported" );
1237
- return - EOPNOTSUPP ;
1238
- }
1239
-
1240
1231
if (!inode_trylock (inode )) {
1241
1232
if (iocb -> ki_flags & IOCB_NOWAIT )
1242
1233
return - EAGAIN ;
1243
1234
inode_lock (inode );
1244
1235
}
1245
1236
1237
+ ret = check_write_restriction (inode );
1238
+ if (ret )
1239
+ goto out ;
1240
+
1241
+ if (is_compressed (ni ) && (iocb -> ki_flags & IOCB_DIRECT )) {
1242
+ ntfs_inode_warn (inode , "direct i/o + compressed not supported" );
1243
+ ret = - EOPNOTSUPP ;
1244
+ goto out ;
1245
+ }
1246
+
1246
1247
ret = generic_write_checks (iocb , from );
1247
1248
if (ret <= 0 )
1248
1249
goto out ;
You can’t perform that action at this time.
0 commit comments