]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/fat/file.c
fat: restructure export_operations
[linux.git] / fs / fat / file.c
index 3978f8ca1823bb6d8f0eddbf0c005344c8d45198..b0b632e50ddb502fca6fe5ac1533df7bae5c33a5 100644 (file)
@@ -306,6 +306,11 @@ 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;
+
+       if (MSDOS_SB(inode->i_sb)->options.nfs == FAT_NFS_NOSTALE_RO) {
+               /* Use i_pos for ino. This is used as fileid of nfs. */
+               stat->ino = fat_i_pos_read(MSDOS_SB(inode->i_sb), inode);
+       }
        return 0;
 }
 EXPORT_SYMBOL_GPL(fat_getattr);