]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fat: add mutex lock to fat_build_inode
authorNamjae Jeon <namjae.jeon@samsung.com>
Sat, 3 Nov 2012 00:43:00 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Nov 2012 04:58:44 +0000 (15:58 +1100)
commit4839e5910b786b8a0c3e77541225f9bf01cec767
treece53825068bb11e08f7d9f19d1f355be6488f38e
parentb2496591b9bc1aacc96033b808a810c087d3ba79
fat: add mutex lock to fat_build_inode

fat_nfs_get_inode() does not hold i_mutex of parent directory.  So add
lock to fat_build_inode().

We are making use of fat_build_inode to build the inode using 'i_pos'.
Since, this function is local to FAT and when mounted over NFS. We can
make use of FAT parallely from local NFS Server and mounted from NFS
client. So, in order to avoid race to multiple regeneration for the
same 'i_pos' - we have introduced this locking.

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>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/fat.h
fs/fat/inode.c