diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-16 19:53:45 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-16 19:53:45 +0200 |
commit | 5c60a7389d795e001c8748b458eb76e3a5b6008c (patch) | |
tree | 5ac51994e6ddfd438f99aecdf228506e871f3a78 /fs | |
parent | Merge tag 'vfio-v4.19-rc1' of git://github.com/awilliam/linux-vfio (diff) | |
parent | orangefs: remove redundant pointer orangefs_inode (diff) | |
download | linux-5c60a7389d795e001c8748b458eb76e3a5b6008c.tar.xz linux-5c60a7389d795e001c8748b458eb76e3a5b6008c.zip |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/orangefs/file.c | 19 | ||||
-rw-r--r-- | fs/orangefs/inode.c | 3 |
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 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); } 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, { 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 |