Skip to content

Commit

Permalink
fs/adfs: super: correct superblock flags
Browse files Browse the repository at this point in the history
We don't support atime updates of any kind, and we ought to set the
read-only bit if we are compiled without write support.

Signed-off-by: Russell King <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Russell King authored and Al Viro committed Jun 27, 2019
1 parent 5ed70bb commit 421d3c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/adfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "dir_f.h"
#include "dir_fplus.h"

#define ADFS_SB_FLAGS SB_NOATIME

#define ADFS_DEFAULT_OWNER_MASK S_IRWXU
#define ADFS_DEFAULT_OTHER_MASK (S_IRWXG | S_IRWXO)

Expand Down Expand Up @@ -227,7 +229,7 @@ static int parse_options(struct super_block *sb, char *options)
static int adfs_remount(struct super_block *sb, int *flags, char *data)
{
sync_filesystem(sb);
*flags |= SB_NODIRATIME;
*flags |= ADFS_SB_FLAGS;
return parse_options(sb, data);
}

Expand Down Expand Up @@ -371,7 +373,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
struct inode *root;
int ret = -EINVAL;

sb->s_flags |= SB_NODIRATIME;
sb->s_flags |= ADFS_SB_FLAGS;

asb = kzalloc(sizeof(*asb), GFP_KERNEL);
if (!asb)
Expand Down

0 comments on commit 421d3c0

Please sign in to comment.