]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat (exportfs): rebuild directory-inode if fat_dget()
authorNamjae Jeon <namjae.jeon@samsung.com>
Wed, 20 Mar 2013 04:08:26 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 22 Mar 2013 04:33:53 +0000 (15:33 +1100)
commit8bf63d24f4e2d487aad4abe83f8824757bf7315b
treec49100a0b27cb5ade28bd72b93de77a4d6cef567
parent3f0978d9a7aa8a57b5f35f13ff07fbeecc2daf84
fat (exportfs): rebuild directory-inode if fat_dget()

This patch enables rebuilding of directory inodes which are not present in
the cache.This is done by traversing the disk clusters to find the
directory entry of the parent directory and using its i_pos to build the
inode.

The traversal is done by fat_scan_logstart() which is similar to
fat_scan() but matches i_pos values instead of names.fat_scan_logstart()
needs an inode parameter to work, for which a dummy inode is created by
it's caller fat_rebuild_parent().  This dummy inode is destroyed after the
traversal completes.

All this is done  only if the nostale_ro nfs mount option is specified.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ravishankar N <ravi.n1@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/dir.c
fs/fat/fat.h
fs/fat/inode.c
fs/fat/nfs.c