diff mbox series

vfs: explicitly include fileattr.h dependency

Message ID 20210622194300.2617430-1-kbusch@kernel.org (mailing list archive)
State New, archived
Headers show
Series vfs: explicitly include fileattr.h dependency | expand

Commit Message

Keith Busch June 22, 2021, 7:43 p.m. UTC
linux/fileattr.h has an implicit requirement that linux/fs.h be included
first. Make that dependency explicit.

Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Jens Axboe: <axboe@kernel.dk>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 include/linux/fileattr.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Matthew Wilcox June 22, 2021, 7:55 p.m. UTC | #1
On Tue, Jun 22, 2021 at 12:43:00PM -0700, Keith Busch wrote:
> linux/fileattr.h has an implicit requirement that linux/fs.h be included
> first. Make that dependency explicit.
> 
> Cc: Miklos Szeredi <mszeredi@redhat.com>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Jens Axboe: <axboe@kernel.dk>
> Signed-off-by: Keith Busch <kbusch@kernel.org>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Jens Axboe June 22, 2021, 9:44 p.m. UTC | #2
On 6/22/21 1:43 PM, Keith Busch wrote:
> linux/fileattr.h has an implicit requirement that linux/fs.h be included
> first. Make that dependency explicit.

Reviewed-by: Jens Axboe <axboe@kernel.dk>
Amir Goldstein June 23, 2021, 5:16 a.m. UTC | #3
On Tue, Jun 22, 2021 at 10:47 PM Keith Busch <kbusch@kernel.org> wrote:
>
> linux/fileattr.h has an implicit requirement that linux/fs.h be included
> first. Make that dependency explicit.
>
> Cc: Miklos Szeredi <mszeredi@redhat.com>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Jens Axboe: <axboe@kernel.dk>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
>  include/linux/fileattr.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/fileattr.h b/include/linux/fileattr.h
> index 9e37e063ac69..34e153172a85 100644
> --- a/include/linux/fileattr.h
> +++ b/include/linux/fileattr.h
> @@ -3,6 +3,8 @@
>  #ifndef _LINUX_FILEATTR_H
>  #define _LINUX_FILEATTR_H
>
> +#include <linux/fs.h>
> +
>  /* Flags shared betwen flags/xflags */
>  #define FS_COMMON_FL \
>         (FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \
> --

Thinking out loud:
Would it be better to split out the flag definitions to uapi/linux/fileattr.h
and include it from here and from uapi/linux/fs.h?

Will that cause UAPI pain??

Thanks,
Amir.
diff mbox series

Patch

diff --git a/include/linux/fileattr.h b/include/linux/fileattr.h
index 9e37e063ac69..34e153172a85 100644
--- a/include/linux/fileattr.h
+++ b/include/linux/fileattr.h
@@ -3,6 +3,8 @@ 
 #ifndef _LINUX_FILEATTR_H
 #define _LINUX_FILEATTR_H
 
+#include <linux/fs.h>
+
 /* Flags shared betwen flags/xflags */
 #define FS_COMMON_FL \
 	(FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \