summaryrefslogtreecommitdiffstats
path: root/fs/adfs/adfs.h
diff options
context:
space:
mode:
authorRussell King2019-06-04 15:49:30 +0200
committerAl Viro2019-06-27 02:14:13 +0200
commit1dfdfc94730bde781c87b25fd606f6dfaffe9097 (patch)
treed9bea48d5933b429b1ded67b9fc3f099d4c6c7ed /fs/adfs/adfs.h
parentfs/adfs: correct disc record structure (diff)
downloadkernel-qcow2-linux-1dfdfc94730bde781c87b25fd606f6dfaffe9097.tar.gz
kernel-qcow2-linux-1dfdfc94730bde781c87b25fd606f6dfaffe9097.tar.xz
kernel-qcow2-linux-1dfdfc94730bde781c87b25fd606f6dfaffe9097.zip
fs/adfs: add helper to get discrecord from map
Add a helper to get the disc record from the map, rather than open coding this in adfs_fill_super(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/adfs.h')
-rw-r--r--fs/adfs/adfs.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h
index 804c6a77c5db..5a72a0ea03bd 100644
--- a/fs/adfs/adfs.h
+++ b/fs/adfs/adfs.h
@@ -1,4 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#include <linux/buffer_head.h>
#include <linux/fs.h>
#include <linux/adfs_fs.h>
@@ -18,8 +19,6 @@
#include "dir_f.h"
-struct buffer_head;
-
/*
* adfs file system inode data in memory
*/
@@ -195,3 +194,10 @@ __adfs_block_map(struct super_block *sb, unsigned int object_id,
return adfs_map_lookup(sb, object_id >> 8, block);
}
+
+/* Return the disc record from the map */
+static inline
+struct adfs_discrecord *adfs_map_discrecord(struct adfs_discmap *dm)
+{
+ return (void *)(dm[0].dm_bh->b_data + 4);
+}