Commit 5c60a738 authored by Linus Torvalds's avatar Linus Torvalds

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
parents b6d6a307 e1b43769
...@@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar ...@@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar
return ret; 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; struct file *file = vmf->vma->vm_file;
int rc; int ret;
rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
STATX_SIZE); STATX_SIZE);
if (rc == -ESTALE) if (ret == -ESTALE)
rc = -EIO; ret = -EIO;
if (rc) { if (ret) {
gossip_err("%s: orangefs_inode_getattr failed, " gossip_err("%s: orangefs_inode_getattr failed, ret:%d:.\n",
"rc:%d:.\n", __func__, rc); __func__, ret);
return rc; return VM_FAULT_SIGBUS;
} }
return filemap_fault(vmf); return filemap_fault(vmf);
} }
......
...@@ -251,7 +251,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat, ...@@ -251,7 +251,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
{ {
int ret = -ENOENT; int ret = -ENOENT;
struct inode *inode = path->dentry->d_inode; struct inode *inode = path->dentry->d_inode;
struct orangefs_inode_s *orangefs_inode = NULL;
gossip_debug(GOSSIP_INODE_DEBUG, gossip_debug(GOSSIP_INODE_DEBUG,
"orangefs_getattr: called on %pd\n", "orangefs_getattr: called on %pd\n",
...@@ -262,8 +261,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat, ...@@ -262,8 +261,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
generic_fillattr(inode, stat); generic_fillattr(inode, stat);
/* override block size reported to stat */ /* override block size reported to stat */
orangefs_inode = ORANGEFS_I(inode);
if (request_mask & STATX_SIZE) if (request_mask & STATX_SIZE)
stat->result_mask = STATX_BASIC_STATS; stat->result_mask = STATX_BASIC_STATS;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment