From b4c6a6aca7e7590528efbd6562551ae5e6ba20e3 Mon Sep 17 00:00:00 2001 From: Yang Shi Date: Wed, 24 Feb 2016 14:37:11 +0800 Subject: [PATCH 1/3] yaffs2: replace f_dentry to f_path.dentry Upstream commit 78d28e651f97866d608d9b41f8ad291e65d47dd5 ("kill f_dentry macro") removed f_dentry from struct file, so replace it to f_path.dentry to fix the build failure. Signed-off-by: Yang Shi Signed-off-by: Bruce Ashfield --- fs/yaffs2/yaffs_vfs.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c index a84e57eb701d..fbbf31303537 100644 --- a/fs/yaffs2/yaffs_vfs.c +++ b/fs/yaffs2/yaffs_vfs.c @@ -274,7 +274,7 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg) (long long)pos, (unsigned)PAGE_CACHE_SIZE); - obj = yaffs_dentry_to_obj(f->f_dentry); + obj = yaffs_dentry_to_obj(f->f_path.dentry); dev = obj->my_dev; @@ -472,7 +472,7 @@ static ssize_t yaffs_hold_space(struct file *f) int n_free_chunks; - obj = yaffs_dentry_to_obj(f->f_dentry); + obj = yaffs_dentry_to_obj(f->f_path.dentry); dev = obj->my_dev; @@ -490,7 +490,7 @@ static void yaffs_release_space(struct file *f) struct yaffs_obj *obj; struct yaffs_dev *dev; - obj = yaffs_dentry_to_obj(f->f_dentry); + obj = yaffs_dentry_to_obj(f->f_path.dentry); dev = obj->my_dev; @@ -582,7 +582,7 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, struct inode *inode; struct yaffs_dev *dev; - obj = yaffs_dentry_to_obj(f->f_dentry); + obj = yaffs_dentry_to_obj(f->f_path.dentry); if (!obj) { yaffs_trace(YAFFS_TRACE_OS, @@ -594,7 +594,7 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, yaffs_gross_lock(dev); - inode = f->f_dentry->d_inode; + inode = f->f_path.dentry->d_inode; if (!S_ISBLK(inode->i_mode) && f->f_flags & O_APPEND) ipos = inode->i_size; @@ -745,7 +745,7 @@ static int yaffs_file_flush(struct file *file, fl_owner_t id) static int yaffs_file_flush(struct file *file) #endif { - struct yaffs_obj *obj = yaffs_dentry_to_obj(file->f_dentry); + struct yaffs_obj *obj = yaffs_dentry_to_obj(file->f_path.dentry); struct yaffs_dev *dev = obj->my_dev; @@ -1712,14 +1712,14 @@ static int yaffs_readdir(struct file *file, struct dir_context *ctx) struct yaffs_obj *obj; struct yaffs_dev *dev; struct yaffs_search_context *sc; - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; unsigned long offset, curoffs; struct yaffs_obj *l; int ret_val = 0; char name[YAFFS_MAX_NAME_LENGTH + 1]; - obj = yaffs_dentry_to_obj(file->f_dentry); + obj = yaffs_dentry_to_obj(file->f_path.dentry); dev = obj->my_dev; yaffs_gross_lock(dev); @@ -1753,7 +1753,7 @@ static int yaffs_readdir(struct file *file, struct dir_context *ctx) if (offset == 1) { yaffs_trace(YAFFS_TRACE_OS, "yaffs_readdir: entry .. ino %d", - (int)file->f_dentry->d_parent->d_inode->i_ino); + (int)file->f_path.dentry->d_parent->d_inode->i_ino); yaffs_gross_unlock(dev); if (!dir_emit_dotdot(file, ctx)) { yaffs_gross_lock(dev); @@ -1815,14 +1815,14 @@ static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir) struct yaffs_obj *obj; struct yaffs_dev *dev; struct yaffs_search_context *sc; - struct inode *inode = f->f_dentry->d_inode; + struct inode *inode = f->f_path.dentry->d_inode; unsigned long offset, curoffs; struct yaffs_obj *l; int ret_val = 0; char name[YAFFS_MAX_NAME_LENGTH + 1]; - obj = yaffs_dentry_to_obj(f->f_dentry); + obj = yaffs_dentry_to_obj(f->f_path.dentry); dev = obj->my_dev; yaffs_gross_lock(dev); @@ -1856,10 +1856,10 @@ static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir) if (offset == 1) { yaffs_trace(YAFFS_TRACE_OS, "yaffs_readdir: entry .. ino %d", - (int)f->f_dentry->d_parent->d_inode->i_ino); + (int)f->f_path.dentry->d_parent->d_inode->i_ino); yaffs_gross_unlock(dev); if (filldir(dirent, "..", 2, offset, - f->f_dentry->d_parent->d_inode->i_ino, + f->f_path.dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) { yaffs_gross_lock(dev); goto out; -- 2.5.0