Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1380440 > unrolled thread
| Started by | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| First post | 2016-04-16 03:00 +0200 |
| Last post | 2016-04-16 03:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 06/15] reiserfs: open-code reiserfs_mutex_lock_safe() in reiserfs_unpack() Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-16 03:00 +0200
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Date | 2016-04-16 03:00 +0200 |
| Subject | [PATCH 06/15] reiserfs: open-code reiserfs_mutex_lock_safe() in reiserfs_unpack() |
| Message-ID | <romKB-3oC-1@gated-at.bofh.it> |
From: Al Viro <viro@zeniv.linux.org.uk>
... and have it use inode_lock()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
fs/reiserfs/ioctl.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index 036a1fc..f49afe7 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -187,7 +187,11 @@ int reiserfs_unpack(struct inode *inode, struct file *filp)
}
/* we need to make sure nobody is changing the file size beneath us */
- reiserfs_mutex_lock_safe(&inode->i_mutex, inode->i_sb);
+{
+ int depth = reiserfs_write_unlock_nested(inode->i_sb);
+ inode_lock(inode);
+ reiserfs_write_lock_nested(inode->i_sb, depth);
+}
reiserfs_write_lock(inode->i_sb);
--
2.8.0.rc3
Back to top | Article view | linux.kernel
csiph-web