diff options
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/file.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/fat/file.c b/fs/fat/file.c index f4b8f8b3fb..0aa813d944 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp_lock.h> | 13 | #include <linux/smp_lock.h> |
14 | #include <linux/buffer_head.h> | 14 | #include <linux/buffer_head.h> |
15 | #include <linux/writeback.h> | 15 | #include <linux/writeback.h> |
16 | #include <linux/backing-dev.h> | ||
16 | #include <linux/blkdev.h> | 17 | #include <linux/blkdev.h> |
17 | 18 | ||
18 | int fat_generic_ioctl(struct inode *inode, struct file *filp, | 19 | int fat_generic_ioctl(struct inode *inode, struct file *filp, |
@@ -118,7 +119,7 @@ static int fat_file_release(struct inode *inode, struct file *filp) | |||
118 | if ((filp->f_mode & FMODE_WRITE) && | 119 | if ((filp->f_mode & FMODE_WRITE) && |
119 | MSDOS_SB(inode->i_sb)->options.flush) { | 120 | MSDOS_SB(inode->i_sb)->options.flush) { |
120 | fat_flush_inodes(inode->i_sb, inode, NULL); | 121 | fat_flush_inodes(inode->i_sb, inode, NULL); |
121 | blk_congestion_wait(WRITE, HZ/10); | 122 | congestion_wait(WRITE, HZ/10); |
122 | } | 123 | } |
123 | return 0; | 124 | return 0; |
124 | } | 125 | } |
@@ -302,7 +303,17 @@ void fat_truncate(struct inode *inode) | |||
302 | fat_flush_inodes(inode->i_sb, inode, NULL); | 303 | fat_flush_inodes(inode->i_sb, inode, NULL); |
303 | } | 304 | } |
304 | 305 | ||
306 | int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | ||
307 | { | ||
308 | struct inode *inode = dentry->d_inode; | ||
309 | generic_fillattr(inode, stat); | ||
310 | stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size; | ||
311 | return 0; | ||
312 | } | ||
313 | EXPORT_SYMBOL_GPL(fat_getattr); | ||
314 | |||
305 | struct inode_operations fat_file_inode_operations = { | 315 | struct inode_operations fat_file_inode_operations = { |
306 | .truncate = fat_truncate, | 316 | .truncate = fat_truncate, |
307 | .setattr = fat_notify_change, | 317 | .setattr = fat_notify_change, |
318 | .getattr = fat_getattr, | ||
308 | }; | 319 | }; |