Skip to content

Commit 68516f6

Browse files
committed
afs: Mark a superblock for an R/O or Backup volume as SB_RDONLY
Mark a superblock that is for for an R/O or Backup volume as SB_RDONLY when mounting it. Signed-off-by: David Howells <[email protected]> cc: Marc Dionne <[email protected]> cc: [email protected]
1 parent b590eb4 commit 68516f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/afs/super.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,10 @@ static int afs_validate_fc(struct fs_context *fc)
407407
return PTR_ERR(volume);
408408

409409
ctx->volume = volume;
410-
if (volume->type != AFSVL_RWVOL)
410+
if (volume->type != AFSVL_RWVOL) {
411411
ctx->flock_mode = afs_flock_mode_local;
412+
fc->sb_flags |= SB_RDONLY;
413+
}
412414
}
413415

414416
return 0;

0 commit comments

Comments
 (0)