Skip to content

Commit

Permalink
Merge tag 'for-linus-4.19-ofs1' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Aug 16, 2018
2 parents b6d6a30 + e1b4376 commit 5c60a73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
19 changes: 10 additions & 9 deletions fs/orangefs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar
return ret;
}

static int orangefs_fault(struct vm_fault *vmf)
static vm_fault_t orangefs_fault(struct vm_fault *vmf)
{
struct file *file = vmf->vma->vm_file;
int rc;
rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
int ret;

ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
STATX_SIZE);
if (rc == -ESTALE)
rc = -EIO;
if (rc) {
gossip_err("%s: orangefs_inode_getattr failed, "
"rc:%d:.\n", __func__, rc);
return rc;
if (ret == -ESTALE)
ret = -EIO;
if (ret) {
gossip_err("%s: orangefs_inode_getattr failed, ret:%d:.\n",
__func__, ret);
return VM_FAULT_SIGBUS;
}
return filemap_fault(vmf);
}
Expand Down
3 changes: 0 additions & 3 deletions fs/orangefs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
{
int ret = -ENOENT;
struct inode *inode = path->dentry->d_inode;
struct orangefs_inode_s *orangefs_inode = NULL;

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

/* override block size reported to stat */
orangefs_inode = ORANGEFS_I(inode);

if (request_mask & STATX_SIZE)
stat->result_mask = STATX_BASIC_STATS;
else
Expand Down

0 comments on commit 5c60a73

Please sign in to comment.