mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
565762f3fa
commit
da63fc7ce6
4 changed files with 14 additions and 0 deletions
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue