reiserfs: Fix mistake in down_write() conversion
authorFrederic Weisbecker <fweisbec@gmail.com>
Sun, 3 Jan 2010 02:44:53 +0000 (03:44 +0100)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sun, 3 Jan 2010 02:44:53 +0000 (03:44 +0100)
Fix a mistake in commit 0719d3434747889b314a1e8add776418c4148bcf
(reiserfs: Fix reiserfs lock <-> i_xattr_sem dependency inversion)
that has converted a down_write() into a down_read() accidentally.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
fs/reiserfs/xattr.c

index 9623cfe2371cf6fe51239ff6b73065f0ba15c35a..75d3706734ec69e44d4ef761c7f912856e569b51 100644 (file)
@@ -495,7 +495,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th,
                return PTR_ERR(dentry);
        }
 
-       down_read(&REISERFS_I(inode)->i_xattr_sem);
+       down_write(&REISERFS_I(inode)->i_xattr_sem);
 
        reiserfs_write_lock(inode->i_sb);