new helper: file_inode(file)

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2013-01-23 17:07:38 -05:00
commit 496ad9aa8e
306 changed files with 696 additions and 717 deletions

View file

@ -265,7 +265,7 @@ static int fd_do_rw(struct se_cmd *cmd, struct scatterlist *sgl,
* the expected virt_size for struct file w/o a backing struct
* block_device.
*/
if (S_ISBLK(fd->f_dentry->d_inode->i_mode)) {
if (S_ISBLK(file_inode(fd)->i_mode)) {
if (ret < 0 || ret != cmd->data_length) {
pr_err("%s() returned %d, expecting %u for "
"S_ISBLK\n", __func__, ret,