From 4700f2f8b9dbaad5ae441b682d04b09e811135fc Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Tue, 31 Jan 2017 16:24:26 +0800 Subject: [PATCH 2/2] fs: yaffs2: fix the prototype of function yaffs_rename() The "rename2" of i_op has been renamed to "rename" in commit 2773bf00aeb9("fs: rename "rename2" i_op to "rename""). We do what we have done in commit 1cd66c93ba8c("fs: make remaining filesystems use .rename2") for yaffs2 according to this change. Signed-off-by: Kevin Hao Signed-off-by: Bruce Ashfield --- fs/yaffs2/yaffs_vfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c index efcb118d2ba1..c9dea27a4a78 100644 --- a/fs/yaffs2/yaffs_vfs.c +++ b/fs/yaffs2/yaffs_vfs.c @@ -1487,12 +1487,16 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry, * NB: POSIX says you can rename an object over an old object of the same name */ static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry) + struct inode *new_dir, struct dentry *new_dentry, + unsigned int flags) { struct yaffs_dev *dev; int ret_val = YAFFS_FAIL; struct yaffs_obj *target; + if (flags) + return -EINVAL; + yaffs_trace(YAFFS_TRACE_OS, "yaffs_rename"); dev = yaffs_inode_to_obj(old_dir)->my_dev; -- 2.5.0