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)
12281228 ssize_t ret ;
12291229 int err ;
12301230
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-
12401231 if (!inode_trylock (inode )) {
12411232 if (iocb -> ki_flags & IOCB_NOWAIT )
12421233 return - EAGAIN ;
12431234 inode_lock (inode );
12441235 }
12451236
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+
12461247 ret = generic_write_checks (iocb , from );
12471248 if (ret <= 0 )
12481249 goto out ;
You can’t perform that action at this time.
0 commit comments