aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/fat.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-07 13:44:36 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:12 -0400
commitb522412aeabadbb302fd4338eaabf09d10e2d29c (patch)
tree6b6b73686bc77e10a3a8275e84bc545ddf7755b6 /fs/fat/fat.h
parent964f5369667b342994fe3f384e9ba41d404ee796 (diff)
Sanitize ->fsync() for FAT
* mark directory data blocks as assoc. metadata * add new inode to deal with FAT, mark FAT blocks as assoc. metadata of that * now ->fsync() is trivial both for files and directories Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r--fs/fat/fat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index ea440d65819c..e4d88527b5dd 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -74,6 +74,7 @@ struct msdos_sb_info {
74 74
75 int fatent_shift; 75 int fatent_shift;
76 struct fatent_operations *fatent_ops; 76 struct fatent_operations *fatent_ops;
77 struct inode *fat_inode;
77 78
78 spinlock_t inode_hash_lock; 79 spinlock_t inode_hash_lock;
79 struct hlist_head inode_hashtable[FAT_HASH_SIZE]; 80 struct hlist_head inode_hashtable[FAT_HASH_SIZE];
@@ -251,6 +252,7 @@ struct fat_entry {
251 } u; 252 } u;
252 int nr_bhs; 253 int nr_bhs;
253 struct buffer_head *bhs[2]; 254 struct buffer_head *bhs[2];
255 struct inode *fat_inode;
254}; 256};
255 257
256static inline void fatent_init(struct fat_entry *fatent) 258static inline void fatent_init(struct fat_entry *fatent)
@@ -259,6 +261,7 @@ static inline void fatent_init(struct fat_entry *fatent)
259 fatent->entry = 0; 261 fatent->entry = 0;
260 fatent->u.ent32_p = NULL; 262 fatent->u.ent32_p = NULL;
261 fatent->bhs[0] = fatent->bhs[1] = NULL; 263 fatent->bhs[0] = fatent->bhs[1] = NULL;
264 fatent->fat_inode = NULL;
262} 265}
263 266
264static inline void fatent_set_entry(struct fat_entry *fatent, int entry) 267static inline void fatent_set_entry(struct fat_entry *fatent, int entry)
@@ -275,6 +278,7 @@ static inline void fatent_brelse(struct fat_entry *fatent)
275 brelse(fatent->bhs[i]); 278 brelse(fatent->bhs[i]);
276 fatent->nr_bhs = 0; 279 fatent->nr_bhs = 0;
277 fatent->bhs[0] = fatent->bhs[1] = NULL; 280 fatent->bhs[0] = fatent->bhs[1] = NULL;
281 fatent->fat_inode = NULL;
278} 282}
279 283
280extern void fat_ent_access_init(struct super_block *sb); 284extern void fat_ent_access_init(struct super_block *sb);
@@ -296,6 +300,8 @@ extern int fat_setattr(struct dentry * dentry, struct iattr * attr);
296extern void fat_truncate(struct inode *inode); 300extern void fat_truncate(struct inode *inode);
297extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, 301extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
298 struct kstat *stat); 302 struct kstat *stat);
303extern int fat_file_fsync(struct file *file, struct dentry *dentry,
304 int datasync);
299 305
300/* fat/inode.c */ 306/* fat/inode.c */
301extern void fat_attach(struct inode *inode, loff_t i_pos); 307extern void fat_attach(struct inode *inode, loff_t i_pos);