diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-10 12:25:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-20 14:35:29 +0200 |
commit | b81f475bcd34c01e393ff8039a70ec9a0794f688 (patch) | |
tree | f5e99ce84d6b2e4f192cee5cd4c563d74ddd122b /fs | |
parent | 10948f86a3c50d97aecf6544cba8fd6ee114b095 (diff) | |
download | barebox-b81f475bcd34c01e393ff8039a70ec9a0794f688.tar.gz barebox-b81f475bcd34c01e393ff8039a70ec9a0794f688.tar.xz |
fs: squashfs: set s_op in time
When calling squashfs_mount() s_op needs to be set already, otherwise
calling alloc_inode() yields in a NULL pointer derefence.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/squashfs/squashfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/squashfs/squashfs.c b/fs/squashfs/squashfs.c index 69451f7b84..be03618b2f 100644 --- a/fs/squashfs/squashfs.c +++ b/fs/squashfs/squashfs.c @@ -101,6 +101,7 @@ static int squashfs_probe(struct device_d *dev) if (ret) goto err_out; + sb->s_op = &squashfs_super_ops; ret = squashfs_mount(fsdev, 0); if (ret) { @@ -110,8 +111,6 @@ static int squashfs_probe(struct device_d *dev) squashfs_set_rootarg(fsdev); - sb->s_op = &squashfs_super_ops; - return 0; err_out: |