lkml.org 
[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/18] orangefs: remove mapping_nrpages macro
Date
From: Martin Brandenburg <martin@omnibond.com>

Signed-off-by: Martin Brandenburg <martin@omnibond.com>
---
fs/orangefs/file.c | 4 +---
fs/orangefs/namei.c | 4 ++++
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index afb94ed7cef3..8dfa0e8c7326 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -574,8 +574,6 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
}

-#define mapping_nrpages(idata) ((idata)->nrpages)
-
/*
* Called to notify the module that there are no more references to
* this file (i.e. no processes have it open).
@@ -595,7 +593,7 @@ static int orangefs_file_release(struct inode *inode, struct file *file)
*/
if (file_inode(file) &&
file_inode(file)->i_mapping &&
- mapping_nrpages(&file_inode(file)->i_data)) {
+ file_inode(file)->i_mapping->nrpages) {
if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) {
gossip_debug(GOSSIP_INODE_DEBUG,
"calling flush_racache on %pU\n",
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
index f79401b2486a..d3a62e52c724 100644
--- a/fs/orangefs/namei.c
+++ b/fs/orangefs/namei.c
@@ -330,6 +330,8 @@ static int orangefs_symlink(struct inode *dir,
"Assigned symlink inode new number of %pU\n",
get_khandle_from_ino(inode));

+ inode->i_size = strlen(symname);
+
d_instantiate(dentry, inode);
unlock_new_inode(inode);
orangefs_set_timeout(dentry);
@@ -398,6 +400,8 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
"Assigned dir inode new number of %pU\n",
get_khandle_from_ino(inode));

+ inode->i_size = PAGE_SIZE;
+
d_instantiate(dentry, inode);
unlock_new_inode(inode);
orangefs_set_timeout(dentry);
--
2.15.1
\
 
 \ /
  Last update: 2017-12-12 19:38    [W:0.076 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site