]> git.hungrycats.org Git - linux/commit
[PATCH] bdev: use correct mapping's i_sem
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:06:35 +0000 (18:06 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:06:35 +0000 (18:06 -0800)
commit54df76626b6936f5c2d05b4da420e19c032a84ec
treeedc753bef82d5a74cd0877e3b628408d4a88c545
parent32d666784c4e73f5348398402976c045872058a3
[PATCH] bdev: use correct mapping's i_sem

From: viro@parcelfarce.linux.theplanet.co.uk <viro@parcelfarce.linux.theplanet.co.uk>

In a bunch of places we used file->f_dentry->d_inode->i_sem to protect
fdatasync et.al.  Replaced with corrent file->f_mapping->host->i_sem - the
object we are protecting is address_space, so we want an exclusion that would
work for redirected ->i_mapping.  For normal files (not coda, not bdev) it's
all the same, of course - there we have

  file->f_mapping->host == file->f_dentry->d_inode

and change above is an equivalent transfromation.
fs/buffer.c
fs/nfs/file.c
mm/filemap.c
mm/msync.c