. Adjust for the new ->get_link() of vfs's inode_operations: we don't support RCU mode; . check returned value of __copy_from_user() to make gcc happy (the path is never invoked) in create_item_node40(). Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx>
diff -u -r linux-4.4/fs/reiser4/plugin/inode_ops.c linux-4.5/fs/reiser4/plugin/inode_ops.c --- linux-4.4/fs/reiser4/plugin/inode_ops.c 2016-03-30 11:00:02.712055109 +0200 +++ linux-4.5/fs/reiser4/plugin/inode_ops.c 2016-03-29 15:05:54.603153436 +0200 @@ -394,23 +394,25 @@ */ /** - * reiser4_follow_link_common - follow_link of inode operations + * reiser4_get_link_common: ->get_link() of inode_operations * @dentry: dentry of symlink - * @data: * - * This is common implementation of vfs's followlink method of struct - * inode_operations. * Assumes that inode's i_private points to the content of symbolic link. */ -const char *reiser4_follow_link_common(struct dentry *dentry, void **cookie) +const char *reiser4_get_link_common(struct dentry *dentry, + struct inode *inode, + struct delayed_call *done) { + if (!dentry) + return ERR_PTR(-ECHILD); + assert("vs-851", S_ISLNK(dentry->d_inode->i_mode)); - if (!dentry->d_inode->i_private - || !reiser4_inode_get_flag(dentry->d_inode, - REISER4_GENERIC_PTR_USED)) + if (!dentry->d_inode->i_private || + !reiser4_inode_get_flag(dentry->d_inode, REISER4_GENERIC_PTR_USED)) return ERR_PTR(RETERR(-EINVAL)); - return *cookie = dentry->d_inode->i_private; + + return dentry->d_inode->i_private; } /** @@ -877,3 +879,14 @@ dir->i_ctime = dir->i_mtime = CURRENT_TIME; return reiser4_update_sd(dir); } + +/* + Local variables: + c-indentation-style: "K&R" + mode-name: "LC" + c-basic-offset: 8 + tab-width: 8 + fill-column: 80 + scroll-step: 1 + End: +*/ diff -u -r linux-4.4/fs/reiser4/plugin/node/node40.c linux-4.5/fs/reiser4/plugin/node/node40.c --- linux-4.4/fs/reiser4/plugin/node/node40.c 2016-03-30 11:00:02.718055100 +0200 +++ linux-4.5/fs/reiser4/plugin/node/node40.c 2016-03-29 15:19:23.230063706 +0200 @@ -876,9 +876,10 @@ without this check? */ assert("nikita-3038", reiser4_schedulable()); /* copy data from user space */ - __copy_from_user(zdata(target->node) + offset, - (const char __user *)data->data, - (unsigned)data->length); + if (__copy_from_user(zdata(target->node) + offset, + (const char __user *)data->data, + (unsigned)data->length)) + return RETERR(-EFAULT); } else /* copy from kernel space */ memcpy(zdata(target->node) + offset, data->data, diff -u -r linux-4.4/fs/reiser4/plugin/object.c linux-4.5/fs/reiser4/plugin/object.c --- linux-4.4/fs/reiser4/plugin/object.c 2016-03-30 11:00:02.719055099 +0200 +++ linux-4.5/fs/reiser4/plugin/object.c 2016-03-29 15:06:48.291082076 +0200 @@ -156,7 +156,7 @@ /* VFS methods for symlink files */ static struct inode_operations symlink_file_i_ops = { .readlink = generic_readlink, - .follow_link = reiser4_follow_link_common, + .get_link = reiser4_get_link_common, .permission = reiser4_permission_common, .setattr = reiser4_setattr_common, .getattr = reiser4_getattr_common diff -u -r linux-4.4/fs/reiser4/plugin/object.h linux-4.5/fs/reiser4/plugin/object.h --- linux-4.4/fs/reiser4/plugin/object.h 2016-03-30 11:00:02.719055099 +0200 +++ linux-4.5/fs/reiser4/plugin/object.h 2016-03-29 15:08:27.208950159 +0200 @@ -24,7 +24,8 @@ umode_t mode, dev_t rdev); int reiser4_rename_common(struct inode *old_dir, struct dentry *old_name, struct inode *new_dir, struct dentry *new_name); -const char *reiser4_follow_link_common(struct dentry *, void **cookie); +const char *reiser4_get_link_common(struct dentry *, struct inode *inode, + struct delayed_call *done); int reiser4_permission_common(struct inode *, int mask); int reiser4_setattr_common(struct dentry *, struct iattr *); int reiser4_getattr_common(struct vfsmount *mnt, struct dentry *,