diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fs.h | 29 | ||||
-rw-r--r-- | include/linux/list.h | 11 | ||||
-rw-r--r-- | include/linux/sysrq.h | 2 | ||||
-rw-r--r-- | include/linux/umsdos_fs.p | 3 | ||||
-rw-r--r-- | include/linux/usb.h | 1 |
5 files changed, 29 insertions, 17 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index a33f33768..d0e5c6267 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -91,6 +91,9 @@ extern int max_super_blocks, nr_super_blocks; */ #define FS_NOMOUNT 16 /* Never mount from userland */ #define FS_LITTER 32 /* Keeps the tree in dcache */ +#define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon + * as nfs_rename() will be cleaned up + */ /* * These are the fs-independent mount-flags: up to 16 flags are supported */ @@ -101,17 +104,9 @@ extern int max_super_blocks, nr_super_blocks; #define MS_SYNCHRONOUS 16 /* Writes are synced at once */ #define MS_REMOUNT 32 /* Alter flags of a mounted FS */ #define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ -#define S_QUOTA 128 /* Quota initialized for file/directory/symlink */ -#define S_APPEND 256 /* Append-only file */ -#define S_IMMUTABLE 512 /* Immutable file */ #define MS_NOATIME 1024 /* Do not update access times. */ #define MS_NODIRATIME 2048 /* Do not update directory access times */ -#define MS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon - * as nfs_rename() will be cleaned up - */ -#define S_DEAD (1<<16) /* removed, but still open directory */ - /* * Flags that can be altered by MS_REMOUNT */ @@ -124,6 +119,15 @@ extern int max_super_blocks, nr_super_blocks; #define MS_MGC_VAL 0xC0ED0000 /* magic flag number to indicate "new" flags */ #define MS_MGC_MSK 0xffff0000 /* magic flag number mask */ +/* Inode flags - they have nothing to superblock flags now */ + +#define S_SYNC 1 /* Writes are synced at once */ +#define S_NOATIME 2 /* Do not update access times */ +#define S_QUOTA 4 /* Quota initialized for file */ +#define S_APPEND 8 /* Append-only file */ +#define S_IMMUTABLE 16 /* Immutable file */ +#define S_DEAD 32 /* removed, but still open directory */ + /* * Note that nosuid etc flags are inode-specific: setting some file-system * flags just means all the inodes inherit those flags by default. It might be @@ -137,20 +141,19 @@ extern int max_super_blocks, nr_super_blocks; * i_flags updated. Hence, i_flags no longer inherit the superblock mount * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org */ -#define __IS_FLG(inode,flg) (((inode)->i_sb && (inode)->i_sb->s_flags & (flg)) \ - || (inode)->i_flags & (flg)) +#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg)) -#define IS_RDONLY(inode) (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY)) +#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) #define IS_NOSUID(inode) __IS_FLG(inode, MS_NOSUID) #define IS_NODEV(inode) __IS_FLG(inode, MS_NODEV) #define IS_NOEXEC(inode) __IS_FLG(inode, MS_NOEXEC) -#define IS_SYNC(inode) __IS_FLG(inode, MS_SYNCHRONOUS) +#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC)) #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) #define IS_QUOTAINIT(inode) ((inode)->i_flags & S_QUOTA) #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) -#define IS_NOATIME(inode) __IS_FLG(inode, MS_NOATIME) +#define IS_NOATIME(inode) (__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME)) #define IS_NODIRATIME(inode) __IS_FLG(inode, MS_NODIRATIME) #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) diff --git a/include/linux/list.h b/include/linux/list.h index 4fbe523ab..99ab9c44e 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -85,6 +85,7 @@ static __inline__ void __list_del(struct list_head * prev, /** * list_del - deletes entry from list. * @entry: the element to delete from the list. + * Note: list_empty on entry does not return true after this, the entry is in an undefined state. */ static __inline__ void list_del(struct list_head *entry) { @@ -92,6 +93,16 @@ static __inline__ void list_del(struct list_head *entry) } /** + * list_del_init - deletes entry from list and reinitialize it. + * @entry: the element to delete from the list.n + */ +static __inline__ void list_del_init(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + INIT_LIST_HEAD(entry); +} + +/** * list_empty - tests whether a list is empty * @head: the list to test. */ diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 6c080adba..e630aba70 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -36,5 +36,3 @@ void do_emergency_sync(void); #else #define CHECK_EMERGENCY_SYNC #endif - -extern int sysrq_enabled; diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p index 93ad4d11d..2752cb004 100644 --- a/include/linux/umsdos_fs.p +++ b/include/linux/umsdos_fs.p @@ -26,6 +26,7 @@ int umsdos_newhidden (struct dentry *, struct umsdos_info *); int umsdos_delentry (struct dentry *, struct umsdos_info *, int); int umsdos_findentry (struct dentry *, struct umsdos_info *, int); int umsdos_isempty (struct dentry *); +int umsdos_writeentry (struct dentry *, struct umsdos_info *, int); /* file.c 25/01/95 02.25.38 */ @@ -36,7 +37,7 @@ void UMSDOS_write_inode (struct inode *, int); int UMSDOS_notify_change (struct dentry *, struct iattr *attr); int umsdos_notify_change_locked(struct dentry *, struct iattr *attr); void UMSDOS_put_inode (struct inode *); -int UMSDOS_statfs (struct super_block *, struct statfs *, int); +int UMSDOS_statfs (struct super_block *, struct statfs *); struct super_block *UMSDOS_read_super (struct super_block *, void *, int); void UMSDOS_put_super (struct super_block *); diff --git a/include/linux/usb.h b/include/linux/usb.h index 27e6fe7df..b50c5890c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -576,7 +576,6 @@ extern void usb_release_bandwidth(struct usb_device *dev, struct urb *urb, int i extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout); -extern void usb_init_root_hub(struct usb_device *dev); extern int usb_root_hub_string(int id, int serial, char *type, __u8 *data, int len); extern void usb_connect(struct usb_device *dev); extern void usb_disconnect(struct usb_device **); |