Orangefs: one cleanup and Souptick's vm_fault_t patch

1. Adding new return type vm_fault_t (Souptick Joarder)
 2. remove redundant pointer orangefs_inode (Colin Ian King)
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbdZXmAAoJEM9EDqnrzg2+O+YP/AoU+NnPj9rDYKC/OImp4uhh
 aIER9LOFXFJocWULAQccFXLawRVzllBwwcWSwLlGAa2AT8DyIxpuyxJhNLIfrEKV
 axsfAQA/mU529i8PRgwnYdQJ0cKgzHR9qrQvTrBPAV+xhrlIeQI48cNlriwJikFF
 0bXkWZt5ZSn+e5FkKFm/OqiialwcrOkMGnM+Apa0B9MSvmapLcCuvGxqYYKEbSaV
 JYqnZ3DiDnBp/6RYUY/qn/Azp8gCDfrPlm05lUZnAbyFGwaidunOgNMHTbQAZ//H
 hLuGRsMWOdQqwEMr+H9vPZVBTp6DfupgH8BgB5Y5EHcwgoWK5U3sZZQKP5f8+9vh
 7StCSnc9qT5iJWTbOWIngIpSeNnVa6iF7QMXt7wxOQY2ITu5Cnot1fWhuj2UcA36
 xmf38B6YRX4VeLMc/eryQCD7d4EpBYIqdyaLAg0Qg1Y35DU9b3QkC56ca56uQrHY
 QZeQAqH63CpHiajrYCHE5wsr5zrLXbYj229Idq2KBhEqXcxCV17kwjLF3rpyEbxu
 9I4HpafzQ0Sho+zsCgakyu5DYBAfMbAYqR7pT5MGNB8yYVzxMcSEsAWSQ42Ab1qb
 P09p1ojQQxjrqApMOa6L4MrLNA7Wl75LGRnwNy7c83qkys8Y90JhdZsQlLwlp+PT
 rYnIliKQuTRY+7JV/4WL
 =3Oz+
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2018-08-16 10:53:45 -07:00
commit 5c60a7389d
2 changed files with 10 additions and 12 deletions

View File

@ -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);
}

View File

@ -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",
@ -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