reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reiser4: port for Linux-4.5
@ 2016-03-30  9:20 Edward Shishkin
  2016-04-06  0:42 ` Ivan Shapovalov
  2016-04-06  1:22 ` Ivan Shapovalov
  0 siblings, 2 replies; 7+ messages in thread
From: Edward Shishkin @ 2016-03-30  9:20 UTC (permalink / raw)
  To: Reiserfs development mailing list

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

. 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@gmail.com>

[-- Attachment #2: reiser4-port-for-4.5.patch --]
[-- Type: text/x-patch, Size: 3721 bytes --]

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 *,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiser4: port for Linux-4.5
  2016-03-30  9:20 [PATCH] reiser4: port for Linux-4.5 Edward Shishkin
@ 2016-04-06  0:42 ` Ivan Shapovalov
  2016-04-06 15:21   ` Edward Shishkin
  2016-04-06  1:22 ` Ivan Shapovalov
  1 sibling, 1 reply; 7+ messages in thread
From: Ivan Shapovalov @ 2016-04-06  0:42 UTC (permalink / raw)
  To: Edward Shishkin, Reiserfs development mailing list

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

On 2016-03-30 at 11:20 +0200, Edward Shishkin wrote:
> . 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@gmail.com>

Hi Edward,

could you please send a separate patch with adjustments for 4.4?

Thanks,
-- 
Ivan Shapovalov / intelfx /

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiser4: port for Linux-4.5
  2016-03-30  9:20 [PATCH] reiser4: port for Linux-4.5 Edward Shishkin
  2016-04-06  0:42 ` Ivan Shapovalov
@ 2016-04-06  1:22 ` Ivan Shapovalov
  2016-04-06 15:23   ` Edward Shishkin
  1 sibling, 1 reply; 7+ messages in thread
From: Ivan Shapovalov @ 2016-04-06  1:22 UTC (permalink / raw)
  To: Edward Shishkin, Reiserfs development mailing list

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

On 2016-03-30 at 11:20 +0200, Edward Shishkin wrote:
> . 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@gmail.com>

By the way: I've noticed many times that the resulting squashed patch
which you put on sourceforge is _different_ from what can be composed
using incremental patches you send on the ML.

Maybe you could finally consider having a git repo somewhere (e. g. on
github)? It would be much easier to work with the code (and, for me in
particular, to learn how it works) this way.

Thanks.
-- 
Ivan Shapovalov / intelfx /

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiser4: port for Linux-4.5
  2016-04-06  0:42 ` Ivan Shapovalov
@ 2016-04-06 15:21   ` Edward Shishkin
  2016-04-06 15:26     ` Ivan Shapovalov
  0 siblings, 1 reply; 7+ messages in thread
From: Edward Shishkin @ 2016-04-06 15:21 UTC (permalink / raw)
  To: intelfx, Reiserfs development mailing list

Which "adjustments" do you mean?


On 04/06/2016 02:42 AM, Ivan Shapovalov wrote:
> On 2016-03-30 at 11:20 +0200, Edward Shishkin wrote:
>> . 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@gmail.com>
> Hi Edward,
>
> could you please send a separate patch with adjustments for 4.4?
>
> Thanks,


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiser4: port for Linux-4.5
  2016-04-06  1:22 ` Ivan Shapovalov
@ 2016-04-06 15:23   ` Edward Shishkin
  2016-04-06 15:37     ` Ivan Shapovalov
  0 siblings, 1 reply; 7+ messages in thread
From: Edward Shishkin @ 2016-04-06 15:23 UTC (permalink / raw)
  To: intelfx, Reiserfs development mailing list

On 04/06/2016 03:22 AM, Ivan Shapovalov wrote:
> On 2016-03-30 at 11:20 +0200, Edward Shishkin wrote:
>> . 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@gmail.com>
> By the way: I've noticed many times that the resulting squashed patch
> which you put on sourceforge is _different_ from what can be composed
> using incremental patches you send on the ML.


I never announced any peculiar properties of the patches that I
send to the mailing list. This is mostly for me (to look at the mail
archive and to refresh memory.


>
> Maybe you could finally consider having a git repo somewhere (e. g. on
> github)? It would be much easier to work with the code (and, for me in
> particular, to learn how it works) this way.


I'll consider it sooner or later, since all Namesys archives are
git-based, but it seems that probably "later", because currently I am
very busy..

Edward.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiser4: port for Linux-4.5
  2016-04-06 15:21   ` Edward Shishkin
@ 2016-04-06 15:26     ` Ivan Shapovalov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Shapovalov @ 2016-04-06 15:26 UTC (permalink / raw)
  To: Edward Shishkin, Reiserfs development mailing list

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

On 2016-04-06 at 17:21 +0200, Edward Shishkin wrote:
> Which "adjustments" do you mean?
> 
> 
> On 04/06/2016 02:42 AM, Ivan Shapovalov wrote:
> > 
> > On 2016-03-30 at 11:20 +0200, Edward Shishkin wrote:
> > > 
> > > . 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@gmail.com>
> > Hi Edward,
> > 
> > could you please send a separate patch with adjustments for 4.4?
> > 
> > Thanks,

I meant usual forward-porting changes. But now I see that there were
none :) Sorry for the noise.

-- 
Ivan Shapovalov / intelfx /

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiser4: port for Linux-4.5
  2016-04-06 15:23   ` Edward Shishkin
@ 2016-04-06 15:37     ` Ivan Shapovalov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Shapovalov @ 2016-04-06 15:37 UTC (permalink / raw)
  To: Edward Shishkin, Reiserfs development mailing list

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On 2016-04-06 at 17:23 +0200, Edward Shishkin wrote:
> On 04/06/2016 03:22 AM, Ivan Shapovalov wrote:
> > 
> > [...]
> > By the way: I've noticed many times that the resulting squashed
> > patch
> > which you put on sourceforge is _different_ from what can be
> > composed
> > using incremental patches you send on the ML.
> 
> I never announced any peculiar properties of the patches that I
> send to the mailing list. This is mostly for me (to look at the mail
> archive and to refresh memory.

OK. Life could've been easier...

> > Maybe you could finally consider having a git repo somewhere (e. g.
> > on
> > github)? It would be much easier to work with the code (and, for me
> > in
> > particular, to learn how it works) this way.
> 
> I'll consider it sooner or later, since all Namesys archives are
> git-based, but it seems that probably "later", because currently I am
> very busy..

ditto.

Thanks anyway,
-- 
Ivan Shapovalov / intelfx /

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-06 15:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30  9:20 [PATCH] reiser4: port for Linux-4.5 Edward Shishkin
2016-04-06  0:42 ` Ivan Shapovalov
2016-04-06 15:21   ` Edward Shishkin
2016-04-06 15:26     ` Ivan Shapovalov
2016-04-06  1:22 ` Ivan Shapovalov
2016-04-06 15:23   ` Edward Shishkin
2016-04-06 15:37     ` Ivan Shapovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).