diff options
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/inode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index c2973ea5df9a..a3d81ebf6d86 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -735,10 +735,9 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb, | |||
735 | } | 735 | } |
736 | 736 | ||
737 | static int | 737 | static int |
738 | fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable) | 738 | fat_encode_fh(struct inode *inode, __u32 *fh, int *lenp, struct inode *parent) |
739 | { | 739 | { |
740 | int len = *lenp; | 740 | int len = *lenp; |
741 | struct inode *inode = de->d_inode; | ||
742 | u32 ipos_h, ipos_m, ipos_l; | 741 | u32 ipos_h, ipos_m, ipos_l; |
743 | 742 | ||
744 | if (len < 5) { | 743 | if (len < 5) { |
@@ -754,9 +753,9 @@ fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable) | |||
754 | fh[1] = inode->i_generation; | 753 | fh[1] = inode->i_generation; |
755 | fh[2] = ipos_h; | 754 | fh[2] = ipos_h; |
756 | fh[3] = ipos_m | MSDOS_I(inode)->i_logstart; | 755 | fh[3] = ipos_m | MSDOS_I(inode)->i_logstart; |
757 | spin_lock(&de->d_lock); | 756 | fh[4] = ipos_l; |
758 | fh[4] = ipos_l | MSDOS_I(de->d_parent->d_inode)->i_logstart; | 757 | if (parent) |
759 | spin_unlock(&de->d_lock); | 758 | fh[4] |= MSDOS_I(parent)->i_logstart; |
760 | return 3; | 759 | return 3; |
761 | } | 760 | } |
762 | 761 | ||