Skip to content

Commit

Permalink
nilfs2: add missing initialization of s_mode
Browse files Browse the repository at this point in the history
An fmode_t argument is passed to kill_block_super() through s_mode
member of the super_block structure.  This is used to release the
block device with the same mode, however, nilfs does not set s_mode
anywhere.

This modifies nilfs_get_sb function to properly initialize the s_mode
member.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
Ryusuke Konishi committed May 10, 2010
1 parent 13e9055 commit 4571b82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nilfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,

/* New superblock instance created */
s->s_flags = flags;
s->s_mode = mode;
strlcpy(s->s_id, bdevname(sd.bdev, b), sizeof(s->s_id));
sb_set_blocksize(s, block_size(sd.bdev));

Expand Down

0 comments on commit 4571b82

Please sign in to comment.