From 29277ac98cf6af52dd8d97d00a589a97d36f95b2 Mon Sep 17 00:00:00 2001 From: "Steven J. Magnani" Date: Wed, 11 Jul 2012 14:02:42 -0700 Subject: [PATCH] --- yaml --- r: 311835 b: refs/heads/master c: 5d8ecbbc284f7e7568969574a6601b05f1ed1d90 h: refs/heads/master i: 311833: c6a8d7f99f250452eaa1a365be83039ef11c7a1c 311831: 7312315ffab71251caf033a048c41eae4d08c58e v: v3 --- [refs] | 2 +- trunk/fs/fat/inode.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 5c992bc16b76..c1e7a8237a04 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c46938d4f3ecadd609a06dae0d5b26a30274b338 +refs/heads/master: 5d8ecbbc284f7e7568969574a6601b05f1ed1d90 diff --git a/trunk/fs/fat/inode.c b/trunk/fs/fat/inode.c index a3d81ebf6d86..0038b32cb362 100644 --- a/trunk/fs/fat/inode.c +++ b/trunk/fs/fat/inode.c @@ -738,22 +738,21 @@ static int fat_encode_fh(struct inode *inode, __u32 *fh, int *lenp, struct inode *parent) { int len = *lenp; - u32 ipos_h, ipos_m, ipos_l; + struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); + loff_t i_pos; if (len < 5) { *lenp = 5; return 255; /* no room */ } - ipos_h = MSDOS_I(inode)->i_pos >> 8; - ipos_m = (MSDOS_I(inode)->i_pos & 0xf0) << 24; - ipos_l = (MSDOS_I(inode)->i_pos & 0x0f) << 28; + i_pos = fat_i_pos_read(sbi, inode); *lenp = 5; fh[0] = inode->i_ino; fh[1] = inode->i_generation; - fh[2] = ipos_h; - fh[3] = ipos_m | MSDOS_I(inode)->i_logstart; - fh[4] = ipos_l; + fh[2] = i_pos >> 8; + fh[3] = ((i_pos & 0xf0) << 24) | MSDOS_I(inode)->i_logstart; + fh[4] = (i_pos & 0x0f) << 28; if (parent) fh[4] |= MSDOS_I(parent)->i_logstart; return 3;