summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/hugetlb.h2
-rw-r--r--include/linux/msdos_fs.h46
-rw-r--r--include/linux/msdos_fs_sb.h4
-rw-r--r--include/linux/reiserfs_fs.h2
5 files changed, 29 insertions, 27 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 0ac6a27ea0db..4f090059372e 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -162,7 +162,7 @@ struct bio {
*/
#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
-#define __BVEC_START(bio) bio_iovec_idx((bio), 0)
+#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
#define BIOVEC_VIRT_MERGEABLE(vec1, vec2) \
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index b3dd00de8dc3..72bda668895b 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -39,6 +39,7 @@ mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma)
#ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE
#define is_hugepage_only_range(addr, len) 0
+#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
#endif
#else /* !CONFIG_HUGETLB_PAGE */
@@ -63,6 +64,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
#define is_aligned_hugepage_range(addr, len) 0
#define pmd_huge(x) 0
#define is_hugepage_only_range(addr, len) 0
+#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
#ifndef HPAGE_MASK
#define HPAGE_MASK 0 /* Keep the compiler happy */
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index b1fb57c91086..f5c6209bc8f1 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -4,13 +4,8 @@
/*
* The MS-DOS filesystem constants/structures
*/
-#include <linux/buffer_head.h>
-#include <linux/string.h>
#include <asm/byteorder.h>
-struct statfs;
-
-
#define SECTOR_SIZE 512 /* sector size (bytes) */
#define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */
#define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */
@@ -18,6 +13,9 @@ struct statfs;
#define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
#define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */
+
+#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
+
#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
#define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */
@@ -25,8 +23,6 @@ struct statfs;
#define FAT_MAX_DIR_ENTRIES (65536)
#define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS)
-#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
-
#define ATTR_NONE 0 /* no attribute bits */
#define ATTR_RO 1 /* read-only */
#define ATTR_HIDDEN 2 /* hidden */
@@ -35,10 +31,10 @@ struct statfs;
#define ATTR_DIR 16 /* directory */
#define ATTR_ARCH 32 /* archived */
+/* attribute bits that are copied "as is" */
#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
- /* attribute bits that are copied "as is" */
+/* bits that are used by the Windows 95/Windows NT extended FAT */
#define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
- /* bits that are used by the Windows 95/Windows NT extended FAT */
#define CASE_LOWER_BASE 8 /* base is lower case */
#define CASE_LOWER_EXT 16 /* extension is lower case */
@@ -46,8 +42,12 @@ struct statfs;
#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
+/* valid file mode bits */
#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
- /* valid file mode bits */
+/* Convert attribute bits and a mask to the UNIX mode. */
+#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
+/* Convert the UNIX mode to MS-DOS attribute bits. */
+#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO)
#define MSDOS_NAME 11 /* maximum name length */
#define MSDOS_LONGNAME 256 /* maximum name length */
@@ -55,24 +55,29 @@ struct statfs;
#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
-#define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
-
/* media of boot sector */
#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
+/* maximum number of clusters */
+#define MAX_FAT12 0xFF4
+#define MAX_FAT16 0xFFF4
+#define MAX_FAT32 0x0FFFFFF6
+#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : \
+ MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12)
+
/* bad cluster mark */
#define BAD_FAT12 0xFF7
#define BAD_FAT16 0xFFF7
-#define BAD_FAT32 0xFFFFFF7
+#define BAD_FAT32 0x0FFFFFF7
#define BAD_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? BAD_FAT32 : \
MSDOS_SB(s)->fat_bits == 16 ? BAD_FAT16 : BAD_FAT12)
/* standard EOF */
#define EOF_FAT12 0xFFF
#define EOF_FAT16 0xFFFF
-#define EOF_FAT32 0xFFFFFFF
+#define EOF_FAT32 0x0FFFFFFF
#define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \
MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12)
@@ -80,8 +85,8 @@ struct statfs;
#define FAT_ENT_BAD (BAD_FAT32)
#define FAT_ENT_EOF (EOF_FAT32)
-#define FAT_FSINFO_SIG1 0x41615252
-#define FAT_FSINFO_SIG2 0x61417272
+#define FAT_FSINFO_SIG1 0x41615252
+#define FAT_FSINFO_SIG2 0x61417272
#define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \
&& CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2)
@@ -179,15 +184,10 @@ struct vfat_slot_info {
loff_t i_pos; /* on-disk position of directory entry */
};
-/* Convert attribute bits and a mask to the UNIX mode. */
-#define MSDOS_MKMODE(a,m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
-
-/* Convert the UNIX mode to MS-DOS attribute bits. */
-#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO)
-
-
#ifdef __KERNEL__
+#include <linux/buffer_head.h>
+#include <linux/string.h>
#include <linux/nls.h>
#include <linux/msdos_fs_i.h>
#include <linux/msdos_fs_sb.h>
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index 546458d82ece..c79a172225d3 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -47,9 +47,9 @@ struct msdos_sb_info {
unsigned long data_start; /* first data sector */
unsigned long clusters; /* number of clusters */
unsigned long root_cluster; /* first cluster of the root directory */
- unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */
+ unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */
struct semaphore fat_lock;
- int prev_free; /* previously returned free cluster number */
+ int prev_free; /* previously allocated cluster number */
int free_clusters; /* -1 if undefined */
struct fat_mount_options options;
struct nls_table *nls_disk; /* Codepage used on disk */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index a34e79044978..32fe6c84b3b6 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1719,7 +1719,7 @@ void reiserfs_allow_writes(struct super_block *s) ;
void reiserfs_check_lock_depth(char *caller) ;
void reiserfs_prepare_for_journal(struct super_block *, struct buffer_head *bh, int wait) ;
void reiserfs_restore_prepared_buffer(struct super_block *, struct buffer_head *bh) ;
-int journal_init(struct super_block *, const char * j_dev_name, int old_format) ;
+int journal_init(struct super_block *, const char * j_dev_name, int old_format, unsigned int) ;
int journal_release(struct reiserfs_transaction_handle*, struct super_block *) ;
int journal_release_error(struct reiserfs_transaction_handle*, struct super_block *) ;
int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ;