new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
@ -1139,7 +1139,7 @@ static ssize_t relay_file_read_subbufs(struct file *filp, loff_t *ppos,
|
|||
if (!desc->count)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&filp->f_path.dentry->d_inode->i_mutex);
|
||||
mutex_lock(&file_inode(filp)->i_mutex);
|
||||
do {
|
||||
if (!relay_file_read_avail(buf, *ppos))
|
||||
break;
|
||||
|
@ -1159,7 +1159,7 @@ static ssize_t relay_file_read_subbufs(struct file *filp, loff_t *ppos,
|
|||
*ppos = relay_file_read_end_pos(buf, read_start, ret);
|
||||
}
|
||||
} while (desc->count && ret);
|
||||
mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex);
|
||||
mutex_unlock(&file_inode(filp)->i_mutex);
|
||||
|
||||
return desc->written;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue