diff options
Diffstat (limited to 'fs/hpfs/alloc.c')
-rw-r--r-- | fs/hpfs/alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hpfs/alloc.c b/fs/hpfs/alloc.c index d6a4b55d2ab0..098bf0f4f386 100644 --- a/fs/hpfs/alloc.c +++ b/fs/hpfs/alloc.c | |||
@@ -538,7 +538,7 @@ int hpfs_trim_fs(struct super_block *s, u64 start, u64 end, u64 minlen, unsigned | |||
538 | return 0; | 538 | return 0; |
539 | if (start < sbi->sb_dirband_start + sbi->sb_dirband_size && end > sbi->sb_dirband_start) { | 539 | if (start < sbi->sb_dirband_start + sbi->sb_dirband_size && end > sbi->sb_dirband_start) { |
540 | hpfs_lock(s); | 540 | hpfs_lock(s); |
541 | if (s->s_flags & MS_RDONLY) { | 541 | if (sb_rdonly(s)) { |
542 | err = -EROFS; | 542 | err = -EROFS; |
543 | goto unlock_1; | 543 | goto unlock_1; |
544 | } | 544 | } |
@@ -559,7 +559,7 @@ unlock_1: | |||
559 | end_bmp = (end + 0x3fff) >> 14; | 559 | end_bmp = (end + 0x3fff) >> 14; |
560 | while (start_bmp < end_bmp && !err) { | 560 | while (start_bmp < end_bmp && !err) { |
561 | hpfs_lock(s); | 561 | hpfs_lock(s); |
562 | if (s->s_flags & MS_RDONLY) { | 562 | if (sb_rdonly(s)) { |
563 | err = -EROFS; | 563 | err = -EROFS; |
564 | goto unlock_2; | 564 | goto unlock_2; |
565 | } | 565 | } |