btrfs-progs: remove unnecessary linux/*.h includes

Decrease dependency on system headers, remove where they're not needed
or became stale after code moved. The path-utils.h encapsulate path
operations so include linux/limits.h here, that's where PATH_MAX is
defined.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2021-04-29 19:17:35 +02:00
parent aa56bf3a31
commit b19a603d62
9 changed files with 1 additions and 11 deletions

View file

@ -25,7 +25,6 @@
#include <fcntl.h>
#include <ftw.h>
#include <mntent.h>
#include <linux/limits.h>
#include <linux/version.h>
#include <getopt.h>
#include <limits.h>

View file

@ -27,7 +27,6 @@
#include <limits.h>
#include <getopt.h>
#include <uuid/uuid.h>
#include <linux/magic.h>
#include <btrfsutil.h>

View file

@ -23,7 +23,6 @@
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include <linux/limits.h>
#include <blkid/blkid.h>
#include <uuid/uuid.h>
#include "kernel-lib/overflow.h"

View file

@ -18,6 +18,7 @@
#define __BTRFS_PATH_UTILS_H__
#include <sys/types.h>
#include <linux/limits.h>
char *path_canonicalize_dm_name(const char *ptname);
char *path_canonicalize(const char *path);

View file

@ -30,9 +30,6 @@
#include <unistd.h>
#include <mntent.h>
#include <ctype.h>
#include <linux/loop.h>
#include <linux/major.h>
#include <linux/kdev_t.h>
#include <limits.h>
#include <blkid/blkid.h>
#include <sys/vfs.h>

View file

@ -18,8 +18,6 @@
#define __BTRFS_CONVERT_SOURCE_FS_H__
#include "kerncompat.h"
#include <linux/kdev_t.h>
#include <sys/types.h>
#include <pthread.h>
#include <sys/types.h>

View file

@ -17,7 +17,6 @@
#if BTRFSCONVERT_REISERFS
#include "kerncompat.h"
#include <linux/limits.h>
#include <linux/fs.h>
#include <limits.h>
#include <sys/stat.h>

View file

@ -1,7 +1,6 @@
#ifndef _PERF_LINUX_BITOPS_H_
#define _PERF_LINUX_BITOPS_H_
#include <linux/kernel.h>
#include <endian.h>
#include "common/internal.h"

View file

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <unistd.h>
#include "kernel-lib/list.h"