X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhpfs%2Fhpfs_fn.h;h=29b7a3e55173e8825ed63d8f899076e045641c75;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=0958e5cc519fdd3e6501491ad43dedde35b228c2;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 0958e5cc5..29b7a3e55 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -9,6 +9,7 @@ //#define DBG //#define DEBUG_LOCKS +#include #include #include #include @@ -57,8 +58,8 @@ struct hpfs_inode_info { unsigned i_ea_uid : 1; /* file's uid is stored in ea */ unsigned i_ea_gid : 1; /* file's gid is stored in ea */ unsigned i_dirty : 1; - struct semaphore i_sem; - struct semaphore i_parent; + struct mutex i_mutex; + struct mutex i_parent_mutex; loff_t **i_rddir_off; struct inode vfs_inode; }; @@ -87,6 +88,7 @@ struct hpfs_sb_info { /* 128 bytes lowercasing table */ unsigned *sb_bmp_dir; /* main bitmap directory */ unsigned sb_c_bitmap; /* current bitmap */ + unsigned sb_max_fwd_alloc; /* max forwad allocation */ struct semaphore hpfs_creation_de; /* when creating dirents, nobody else can alloc blocks */ /*unsigned sb_mounting : 1;*/ @@ -141,12 +143,12 @@ static inline struct hpfs_dirent *de_next_de (struct hpfs_dirent *de) static inline struct extended_attribute *fnode_ea(struct fnode *fnode) { - return (struct extended_attribute *)((char *)fnode + fnode->ea_offs); + return (struct extended_attribute *)((char *)fnode + fnode->ea_offs + fnode->acl_size_s); } static inline struct extended_attribute *fnode_end_ea(struct fnode *fnode) { - return (struct extended_attribute *)((char *)fnode + fnode->ea_offs + fnode->ea_size_s); + return (struct extended_attribute *)((char *)fnode + fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s); } static inline struct extended_attribute *next_ea(struct extended_attribute *ea) @@ -201,7 +203,6 @@ static inline unsigned tstbits(unsigned *bmp, unsigned b, unsigned n) int hpfs_chk_sectors(struct super_block *, secno, int, char *); secno hpfs_alloc_sector(struct super_block *, secno, unsigned, int, int); -int hpfs_alloc_if_possible_nolock(struct super_block *, secno); int hpfs_alloc_if_possible(struct super_block *, secno); void hpfs_free_sectors(struct super_block *, secno, unsigned); int hpfs_check_free_dnodes(struct super_block *, int); @@ -239,15 +240,13 @@ void hpfs_set_dentry_operations(struct dentry *); /* dir.c */ struct dentry *hpfs_lookup(struct inode *, struct dentry *, struct nameidata *); -extern struct file_operations hpfs_dir_ops; +extern const struct file_operations hpfs_dir_ops; /* dnode.c */ void hpfs_add_pos(struct inode *, loff_t *); void hpfs_del_pos(struct inode *, loff_t *); struct hpfs_dirent *hpfs_add_de(struct super_block *, struct dnode *, unsigned char *, unsigned, secno); -void hpfs_delete_de(struct super_block *, struct dnode *, struct hpfs_dirent *); -int hpfs_add_to_dnode(struct inode *, dnode_secno, unsigned char *, unsigned, struct hpfs_dirent *, dnode_secno); int hpfs_add_dirent(struct inode *, unsigned char *, unsigned, struct hpfs_dirent *, int); int hpfs_remove_dirent(struct inode *, dnode_secno, struct hpfs_dirent *, struct quad_buffer_head *, int); void hpfs_count_dnodes(struct super_block *, dnode_secno, int *, int *, int *); @@ -267,7 +266,7 @@ void hpfs_set_ea(struct inode *, struct fnode *, char *, char *, int); /* file.c */ int hpfs_file_fsync(struct file *, struct dentry *, int); -extern struct file_operations hpfs_file_ops; +extern const struct file_operations hpfs_file_ops; extern struct inode_operations hpfs_file_iops; extern struct address_space_operations hpfs_aops; @@ -275,7 +274,6 @@ extern struct address_space_operations hpfs_aops; void hpfs_init_inode(struct inode *); void hpfs_read_inode(struct inode *); -void hpfs_write_inode_ea(struct inode *, struct fnode *); void hpfs_write_inode(struct inode *); void hpfs_write_inode_nolock(struct inode *); int hpfs_notify_change(struct dentry *, struct iattr *); @@ -328,13 +326,13 @@ unsigned hpfs_count_one_bitmap(struct super_block *, secno); * local time (HPFS) to GMT (Unix) */ -static inline time_t local_to_gmt(struct super_block *s, time_t t) +static inline time_t local_to_gmt(struct super_block *s, time32_t t) { extern struct timezone sys_tz; return t + sys_tz.tz_minuteswest * 60 + hpfs_sb(s)->sb_timeshift; } -static inline time_t gmt_to_local(struct super_block *s, time_t t) +static inline time32_t gmt_to_local(struct super_block *s, time_t t) { extern struct timezone sys_tz; return t - sys_tz.tz_minuteswest * 60 - hpfs_sb(s)->sb_timeshift;