lkml.org 
[lkml]   [2023]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 5/5] afs: Mark a superblock for an R/O or Backup volume as SB_RDONLY
On Thu, Nov 16, 2023 at 11:53 AM David Howells <dhowells@redhat.com> wrote:
>
> 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
> ---
> fs/afs/super.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/afs/super.c b/fs/afs/super.c
> index e95fb4cb4fcd..a01a0fb2cdbb 100644
> --- a/fs/afs/super.c
> +++ b/fs/afs/super.c
> @@ -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;

Reviewed-by: Marc Dionne <marc.dionne@auristor.com>

Marc

\
 
 \ /
  Last update: 2023-11-20 14:03    [W:0.072 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site