mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user