mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
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 <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
This commit is contained in:
parent
b590eb41be
commit
68516f60c1
@ -407,8 +407,10 @@ static int afs_validate_fc(struct fs_context *fc)
|
||||
return PTR_ERR(volume);
|
||||
|
||||
ctx->volume = volume;
|
||||
if (volume->type != AFSVL_RWVOL)
|
||||
if (volume->type != AFSVL_RWVOL) {
|
||||
ctx->flock_mode = afs_flock_mode_local;
|
||||
fc->sb_flags |= SB_RDONLY;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user