aboutsummaryrefslogtreecommitdiff
path: root/drivers/target/target_core_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_file.c')
-rw-r--r--drivers/target/target_core_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index b9c88497e8f..a65d507b0b0 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -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,