Commit 9285a3a7 authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] Fix linux/msdos_fs.h for userland (1/2)

The following patch moves MSDOS_SB() and MSDOS_I() into #define
__KERNEL__.
parent 198231a8
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
/* /*
* The MS-DOS filesystem constants/structures * The MS-DOS filesystem constants/structures
*/ */
#include <linux/msdos_fs_i.h>
#include <linux/msdos_fs_sb.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
...@@ -54,16 +51,6 @@ ...@@ -54,16 +51,6 @@
#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO) #define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
/* valid file mode bits */ /* valid file mode bits */
static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb)
{
return sb->u.generic_sbp;
}
static inline struct msdos_inode_info *MSDOS_I(struct inode *inode)
{
return list_entry(inode, struct msdos_inode_info, vfs_inode);
}
#define MSDOS_NAME 11 /* maximum name length */ #define MSDOS_NAME 11 /* maximum name length */
#define MSDOS_LONGNAME 256 /* maximum name length */ #define MSDOS_LONGNAME 256 /* maximum name length */
#define MSDOS_SLOTS 21 /* max # of slots needed for short and long names */ #define MSDOS_SLOTS 21 /* max # of slots needed for short and long names */
...@@ -196,6 +183,18 @@ struct vfat_slot_info { ...@@ -196,6 +183,18 @@ struct vfat_slot_info {
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/nls.h> #include <linux/nls.h>
#include <linux/msdos_fs_i.h>
#include <linux/msdos_fs_sb.h>
static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb)
{
return sb->u.generic_sbp;
}
static inline struct msdos_inode_info *MSDOS_I(struct inode *inode)
{
return list_entry(inode, struct msdos_inode_info, vfs_inode);
}
struct fat_cache { struct fat_cache {
struct super_block *sb; /* fs in question. NULL means unused */ struct super_block *sb; /* fs in question. NULL means unused */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment