summaryrefslogtreecommitdiffstats
path: root/fs/ext3/file.c
diff options
context:
space:
mode:
authorArjan van de Ven2006-03-23 12:00:42 +0100
committerLinus Torvalds2006-03-23 16:38:14 +0100
commit97461518610fb1679f67333bb699bb81136e49fe (patch)
tree483fcaf10744a96ad9fced97910fa75610c3fcdb /fs/ext3/file.c
parent[PATCH] sem2mutex: HPFS (diff)
downloadkernel-qcow2-linux-97461518610fb1679f67333bb699bb81136e49fe.tar.gz
kernel-qcow2-linux-97461518610fb1679f67333bb699bb81136e49fe.tar.xz
kernel-qcow2-linux-97461518610fb1679f67333bb699bb81136e49fe.zip
[PATCH] convert ext3's truncate_sem to a mutex
ext3's truncate_sem is always released in the same function it's taken and it otherwise is a mutex as well.. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3/file.c')
-rw-r--r--fs/ext3/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext3/file.c b/fs/ext3/file.c
index 98e78345ead9..59098ea56711 100644
--- a/fs/ext3/file.c
+++ b/fs/ext3/file.c
@@ -37,9 +37,9 @@ static int ext3_release_file (struct inode * inode, struct file * filp)
if ((filp->f_mode & FMODE_WRITE) &&
(atomic_read(&inode->i_writecount) == 1))
{
- down(&EXT3_I(inode)->truncate_sem);
+ mutex_lock(&EXT3_I(inode)->truncate_mutex);
ext3_discard_reservation(inode);
- up(&EXT3_I(inode)->truncate_sem);
+ mutex_unlock(&EXT3_I(inode)->truncate_mutex);
}
if (is_dx(inode) && filp->private_data)
ext3_htree_free_dir_info(filp->private_data);