Skip to content

Commit

Permalink
fat: make sure to set d_ops in fat_get_parent
Browse files Browse the repository at this point in the history
fat_get_parent needs to setup the dentry operations, otherwise we might
lose them when the NFS server needs to reconnect out of cache inodes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
  • Loading branch information
Christoph Hellwig authored and OGAWA Hirofumi committed Nov 11, 2008
1 parent 985eafc commit 5a6bb10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ static struct dentry *fat_get_parent(struct dentry *child)
brelse(bh);

parent = d_obtain_alias(inode);
if (!IS_ERR(parent))
parent->d_op = sb->s_root->d_op;
out:
unlock_super(sb);

Expand Down

0 comments on commit 5a6bb10

Please sign in to comment.