minix_getattr(): don't bother with ->d_parent
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 16 Jul 2011 21:43:09 +0000 (17:43 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Jul 2011 00:47:53 +0000 (20:47 -0400)
we can find superblock easier, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/minix/inode.c

index adcdc0a4e182673ef953e5bafd8e040987df6948..e7d23e25bf1d100a6706210120f98a69914a7298 100644 (file)
@@ -596,8 +596,7 @@ static int minix_write_inode(struct inode *inode, struct writeback_control *wbc)
 
 int minix_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
 {
-       struct inode *dir = dentry->d_parent->d_inode;
-       struct super_block *sb = dir->i_sb;
+       struct super_block *sb = dentry->d_sb;
        generic_fillattr(dentry->d_inode, stat);
        if (INODE_VERSION(dentry->d_inode) == MINIX_V1)
                stat->blocks = (BLOCK_SIZE / 512) * V1_minix_blocks(stat->size, sb);