Skip to content

Commit 5c60a73

Browse files
committed
Merge tag 'for-linus-4.19-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs updates from Mike Marshall: "Orangefs: one cleanup and Souptick's vm_fault_t patch: - add new return type vm_fault_t (Souptick Joarder) - remove redundant pointer (Colin Ian King)" * tag 'for-linus-4.19-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: remove redundant pointer orangefs_inode orangefs: Adding new return type vm_fault_t
2 parents b6d6a30 + e1b4376 commit 5c60a73

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

fs/orangefs/file.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar
528528
return ret;
529529
}
530530

531-
static int orangefs_fault(struct vm_fault *vmf)
531+
static vm_fault_t orangefs_fault(struct vm_fault *vmf)
532532
{
533533
struct file *file = vmf->vma->vm_file;
534-
int rc;
535-
rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
534+
int ret;
535+
536+
ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
536537
STATX_SIZE);
537-
if (rc == -ESTALE)
538-
rc = -EIO;
539-
if (rc) {
540-
gossip_err("%s: orangefs_inode_getattr failed, "
541-
"rc:%d:.\n", __func__, rc);
542-
return rc;
538+
if (ret == -ESTALE)
539+
ret = -EIO;
540+
if (ret) {
541+
gossip_err("%s: orangefs_inode_getattr failed, ret:%d:.\n",
542+
__func__, ret);
543+
return VM_FAULT_SIGBUS;
543544
}
544545
return filemap_fault(vmf);
545546
}

fs/orangefs/inode.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
251251
{
252252
int ret = -ENOENT;
253253
struct inode *inode = path->dentry->d_inode;
254-
struct orangefs_inode_s *orangefs_inode = NULL;
255254

256255
gossip_debug(GOSSIP_INODE_DEBUG,
257256
"orangefs_getattr: called on %pd\n",
@@ -262,8 +261,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
262261
generic_fillattr(inode, stat);
263262

264263
/* override block size reported to stat */
265-
orangefs_inode = ORANGEFS_I(inode);
266-
267264
if (request_mask & STATX_SIZE)
268265
stat->result_mask = STATX_BASIC_STATS;
269266
else

0 commit comments

Comments
 (0)