summaryrefslogtreecommitdiff
path: root/fs/fat/file.c
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2006-11-16 12:19:28 +0300
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-16 22:43:38 +0300
commitda63fc7ce63b43426dc3c69c05e28de2872c159a (patch)
tree4de7da9f3fa59e37176ebbfb364afe8b0bcdac65 /fs/fat/file.c
parent565762f3fae23ec4db26607cf4726de7b5075b3b (diff)
downloadlinux-da63fc7ce63b43426dc3c69c05e28de2872c159a.tar.xz
[PATCH] fat: add fat_getattr()
This adds fat_getattr() for setting stat->blksize. (FAT uses the size of cluster for proper I/O) Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fat/file.c')
-rw-r--r--fs/fat/file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 8337451e7897..0aa813d944a6 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -303,7 +303,17 @@ void fat_truncate(struct inode *inode)
fat_flush_inodes(inode->i_sb, inode, NULL);
}
+int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+{
+ struct inode *inode = dentry->d_inode;
+ generic_fillattr(inode, stat);
+ stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size;
+ return 0;
+}
+EXPORT_SYMBOL_GPL(fat_getattr);
+
struct inode_operations fat_file_inode_operations = {
.truncate = fat_truncate,
.setattr = fat_notify_change,
+ .getattr = fat_getattr,
};