Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178720
b: refs/heads/master
c: 0719d34
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Jan 2, 2010
1 parent 87b180c commit d0f2fb4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98ea3f50bcc97689cc0e1fa3b6733f03aeb8fef4
refs/heads/master: 0719d3434747889b314a1e8add776418c4148bcf
2 changes: 1 addition & 1 deletion trunk/fs/reiserfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th,
if (IS_ERR(dentry))
return PTR_ERR(dentry);

down_write(&REISERFS_I(inode)->i_xattr_sem);
reiserfs_down_read_safe(&REISERFS_I(inode)->i_xattr_sem, inode->i_sb);

xahash = xattr_hash(buffer, buffer_size);
while (buffer_pos < buffer_size || buffer_pos == 0) {
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/linux/reiserfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ reiserfs_mutex_lock_nested_safe(struct mutex *m, unsigned int subclass,
reiserfs_write_lock(s);
}

static inline void
reiserfs_down_read_safe(struct rw_semaphore *sem, struct super_block *s)
{
reiserfs_write_unlock(s);
down_read(sem);
reiserfs_write_lock(s);
}

/*
* When we schedule, we usually want to also release the write lock,
* according to the previous bkl based locking scheme of reiserfs.
Expand Down

0 comments on commit d0f2fb4

Please sign in to comment.