Skip to content

Commit f2f7ba5

Browse files
committed
[GFS2] Make headers compile on their own
As per Jan Engelhardt's comments, this should make all the headers compile on their own by including and/or declaring structures early. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
1 parent 2bdbc5d commit f2f7ba5

27 files changed

Lines changed: 77 additions & 2 deletions

‎fs/gfs2/acl.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef __ACL_DOT_H__
1111
#define __ACL_DOT_H__
1212

13+
#include "incore.h"
14+
1315
#define GFS2_POSIX_ACL_ACCESS "posix_acl_access"
1416
#define GFS2_POSIX_ACL_ACCESS_LEN 16
1517
#define GFS2_POSIX_ACL_DEFAULT "posix_acl_default"

‎fs/gfs2/bmap.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#ifndef __BMAP_DOT_H__
1111
#define __BMAP_DOT_H__
1212

13+
struct inode;
14+
struct gfs2_inode;
15+
struct page;
16+
1317
int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page);
1418
int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary);
1519
int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen);

‎fs/gfs2/dir.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#ifndef __DIR_DOT_H__
1111
#define __DIR_DOT_H__
1212

13+
#include <linux/dcache.h>
14+
15+
struct inode;
16+
struct gfs2_inode;
17+
struct gfs2_inum;
18+
1319
/**
1420
* gfs2_filldir_t - Report a directory entry to the caller of gfs2_dir_read()
1521
* @opaque: opaque data used by the function

‎fs/gfs2/eaops.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define __EAOPS_DOT_H__
1212

1313
struct gfs2_ea_request;
14+
struct gfs2_inode;
1415

1516
struct gfs2_eattr_operations {
1617
int (*eo_get) (struct gfs2_inode *ip, struct gfs2_ea_request *er);

‎fs/gfs2/eattr.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#ifndef __EATTR_DOT_H__
1111
#define __EATTR_DOT_H__
1212

13+
struct gfs2_inode;
14+
struct iattr;
15+
1316
#define GFS2_EA_REC_LEN(ea) be32_to_cpu((ea)->ea_rec_len)
1417
#define GFS2_EA_DATA_LEN(ea) be32_to_cpu((ea)->ea_data_len)
1518

‎fs/gfs2/glock.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef __GLOCK_DOT_H__
1111
#define __GLOCK_DOT_H__
1212

13+
#include "incore.h"
14+
1315
/* Flags for lock requests; used in gfs2_holder gh_flag field.
1416
From lm_interface.h:
1517
#define LM_FLAG_TRY 0x00000001

‎fs/gfs2/glops.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef __GLOPS_DOT_H__
1111
#define __GLOPS_DOT_H__
1212

13+
#include "incore.h"
14+
1315
extern const struct gfs2_glock_operations gfs2_meta_glops;
1416
extern const struct gfs2_glock_operations gfs2_inode_glops;
1517
extern const struct gfs2_glock_operations gfs2_rgrp_glops;

‎fs/gfs2/incore.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef __INCORE_DOT_H__
1111
#define __INCORE_DOT_H__
1212

13+
#include <linux/fs.h>
14+
1315
#define DIO_FORCE 0x00000001
1416
#define DIO_CLEAN 0x00000002
1517
#define DIO_DIRTY 0x00000004

‎fs/gfs2/lm.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef __LM_DOT_H__
1111
#define __LM_DOT_H__
1212

13+
struct gfs2_sbd;
14+
1315
#define GFS2_MIN_LVB_SIZE 32
1416

1517
int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent);

‎fs/gfs2/log.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#ifndef __LOG_DOT_H__
1111
#define __LOG_DOT_H__
1212

13+
#include <linux/list.h>
14+
#include <linux/spinlock.h>
15+
#include "incore.h"
16+
1317
/**
1418
* gfs2_log_lock - acquire the right to mess with the log manager
1519
* @sdp: the filesystem

0 commit comments

Comments
 (0)