diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/exofs/inode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 6ca0b0117f04..5514f3c2c2f4 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
| @@ -903,8 +903,18 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi, | |||
| 903 | ios->in_attr_len = ARRAY_SIZE(attrs); | 903 | ios->in_attr_len = ARRAY_SIZE(attrs); |
| 904 | 904 | ||
| 905 | ret = exofs_sbi_read(ios); | 905 | ret = exofs_sbi_read(ios); |
| 906 | if (ret) | 906 | if (unlikely(ret)) { |
| 907 | EXOFS_ERR("object(0x%llx) corrupted, return empty file=>%d\n", | ||
| 908 | _LLU(ios->obj.id), ret); | ||
| 909 | memset(inode, 0, sizeof(*inode)); | ||
| 910 | inode->i_mode = 0040000 | (0777 & ~022); | ||
| 911 | /* If object is lost on target we might as well enable it's | ||
| 912 | * delete. | ||
| 913 | */ | ||
| 914 | if ((ret == -ENOENT) || (ret == -EINVAL)) | ||
| 915 | ret = 0; | ||
| 907 | goto out; | 916 | goto out; |
| 917 | } | ||
| 908 | 918 | ||
| 909 | ret = extract_attr_from_ios(ios, &attrs[0]); | 919 | ret = extract_attr_from_ios(ios, &attrs[0]); |
| 910 | if (ret) { | 920 | if (ret) { |
