diff mbox

[v3,18/39] ubifs: fill sb->s_cdev in ubifs_fill_super()

Message ID 1442307754-13233-19-git-send-email-yangds.fnst@cn.fujitsu.com
State New
Headers show

Commit Message

Yang Dongsheng Sept. 15, 2015, 9:02 a.m. UTC
We need to fill the sb->s_cdev to tell others, this sb
is for which ubi_volume. quotactl will use this connection
to find the super_block by the device.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
---
 fs/ubifs/super.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index dcffcd6..0e0428b 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2033,6 +2033,7 @@  static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
 		goto out_bdi;
 
 	sb->s_bdi = &c->bdi;
+	sb->s_cdev = ubi_get_volume_cdev(c->ubi);
 	sb->s_fs_info = c;
 	sb->s_magic = UBIFS_SUPER_MAGIC;
 	sb->s_blocksize = UBIFS_BLOCK_SIZE;