aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-16 13:53:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-16 13:53:45 -0400
commit5c60a7389d795e001c8748b458eb76e3a5b6008c (patch)
tree5ac51994e6ddfd438f99aecdf228506e871f3a78
parentb6d6a3076ac4eecb2d9cbcf17730fc160b94cadc (diff)
parente1b437691a624a7e767bbb140c730d2779797f53 (diff)
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
-rw-r--r--fs/orangefs/file.c19
-rw-r--r--fs/orangefs/inode.c3
2 files changed, 10 insertions, 12 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index db0b52187cbc..a5a2fe76568f 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar
528 return ret; 528 return ret;
529} 529}
530 530
531static int orangefs_fault(struct vm_fault *vmf) 531static vm_fault_t orangefs_fault(struct vm_fault *vmf)
532{ 532{
533 struct file *file = vmf->vma->vm_file; 533 struct file *file = vmf->vma->vm_file;
534 int rc; 534 int ret;
535 rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1, 535
536 ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1,
536 STATX_SIZE); 537 STATX_SIZE);
537 if (rc == -ESTALE) 538 if (ret == -ESTALE)
538 rc = -EIO; 539 ret = -EIO;
539 if (rc) { 540 if (ret) {
540 gossip_err("%s: orangefs_inode_getattr failed, " 541 gossip_err("%s: orangefs_inode_getattr failed, ret:%d:.\n",
541 "rc:%d:.\n", __func__, rc); 542 __func__, ret);
542 return rc; 543 return VM_FAULT_SIGBUS;
543 } 544 }
544 return filemap_fault(vmf); 545 return filemap_fault(vmf);
545} 546}
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 6e4d2af8f5bc..31932879b716 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -251,7 +251,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
251{ 251{
252 int ret = -ENOENT; 252 int ret = -ENOENT;
253 struct inode *inode = path->dentry->d_inode; 253 struct inode *inode = path->dentry->d_inode;
254 struct orangefs_inode_s *orangefs_inode = NULL;
255 254
256 gossip_debug(GOSSIP_INODE_DEBUG, 255 gossip_debug(GOSSIP_INODE_DEBUG,
257 "orangefs_getattr: called on %pd\n", 256 "orangefs_getattr: called on %pd\n",
@@ -262,8 +261,6 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
262 generic_fillattr(inode, stat); 261 generic_fillattr(inode, stat);
263 262
264 /* override block size reported to stat */ 263 /* override block size reported to stat */
265 orangefs_inode = ORANGEFS_I(inode);
266
267 if (request_mask & STATX_SIZE) 264 if (request_mask & STATX_SIZE)
268 stat->result_mask = STATX_BASIC_STATS; 265 stat->result_mask = STATX_BASIC_STATS;
269 else 266 else