Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-07-13 Thread Nick Krause
On Fri, Jul 11, 2014 at 11:05 AM, Dan Carpenter wrote: > On Sat, Jun 21, 2014 at 01:59:15AM +0200, Thomas Gleixner wrote: >> On Fri, 20 Jun 2014, Nick Krause wrote: >> >> > Ok that's fine I would return as if it's a NULL the other parts of the >> > function can't continue. >> > Nick >> > >> > On

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-07-13 Thread Nick Krause
On Fri, Jul 11, 2014 at 11:05 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Sat, Jun 21, 2014 at 01:59:15AM +0200, Thomas Gleixner wrote: On Fri, 20 Jun 2014, Nick Krause wrote: Ok that's fine I would return as if it's a NULL the other parts of the function can't continue. Nick

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-07-11 Thread Dan Carpenter
On Sat, Jun 21, 2014 at 01:59:15AM +0200, Thomas Gleixner wrote: > On Fri, 20 Jun 2014, Nick Krause wrote: > > > Ok that's fine I would return as if it's a NULL the other parts of the > > function can't continue. > > Nick > > > > On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter > > wrote: > > >

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-07-11 Thread Dan Carpenter
On Sat, Jun 21, 2014 at 01:59:15AM +0200, Thomas Gleixner wrote: On Fri, 20 Jun 2014, Nick Krause wrote: Ok that's fine I would return as if it's a NULL the other parts of the function can't continue. Nick On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter dan.carpen...@oracle.com

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-22 Thread Al Viro
On Sat, Jun 21, 2014 at 01:59:15AM +0200, Thomas Gleixner wrote: > > > The problem is that we don't know if we should return here or break > > > here. If you don't understand the code, then it's best to just leave it > > > alone. > > Dan, what kind of attitude is that? > > Nick certainly found

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-22 Thread Al Viro
On Sat, Jun 21, 2014 at 01:59:15AM +0200, Thomas Gleixner wrote: The problem is that we don't know if we should return here or break here. If you don't understand the code, then it's best to just leave it alone. Dan, what kind of attitude is that? Nick certainly found an issue where

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
I don't think that it's a good idea , in that case I would recommend either leaving this bug open or close it as there doesn't seem to be a good way of testing this. Cheers Nick On Fri, Jun 20, 2014 at 11:09 PM, Andrew Morton wrote: > On Fri, 20 Jun 2014 22:55:07 -0400 Nick Krause wrote: > >>

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Andrew Morton
On Fri, 20 Jun 2014 22:55:07 -0400 Nick Krause wrote: > On Fri, Jun 20, 2014 at 10:38 PM, Andrew Morton > wrote: > > On Fri, 20 Jun 2014 22:25:47 -0400 Nick Krause wrote: > > > >> If you have any ideas about what is better > >> please let me known. > > > > I think the proposed patch was not a

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
Fair enough if somebody is running this file system I would be happy to have someone test my code in order to fix this. Cheers Nick On Fri, Jun 20, 2014 at 10:38 PM, Andrew Morton wrote: > On Fri, 20 Jun 2014 22:25:47 -0400 Nick Krause wrote: > >> If you have any ideas about what is better >>

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Andrew Morton
On Fri, 20 Jun 2014 22:25:47 -0400 Nick Krause wrote: > If you have any ideas about what is better > please let me known. I think the proposed patch was not a good one - it will cause truncate to silently return, probably leaving the fs in an inconsistent state. Neither the user nor the

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
Thanks for standing up for me Thomas. If you have any ideas about what is better please let me known. Cheers Nick On Fri, Jun 20, 2014 at 7:59 PM, Thomas Gleixner wrote: > On Fri, 20 Jun 2014, Nick Krause wrote: > >> Ok that's fine I would return as if it's a NULL the other parts of the >>

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Thomas Gleixner
On Fri, 20 Jun 2014, Nick Krause wrote: > Ok that's fine I would return as if it's a NULL the other parts of the > function can't continue. > Nick > > On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter > wrote: > > On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote: > >>

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
Ok that's fine I would return as if it's a NULL the other parts of the function can't continue. Nick On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter wrote: > On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote: >> Signed-off-by: Nicholas Krause >> --- >> fs/affs/file.c | 2 ++ >> 1

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
Ok that's fine I would return as if it's a NULL the other parts of the function can't continue. Nick On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote: Signed-off-by: Nicholas Krause xerofo...@gmail.com

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Thomas Gleixner
On Fri, 20 Jun 2014, Nick Krause wrote: Ok that's fine I would return as if it's a NULL the other parts of the function can't continue. Nick On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote:

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
Thanks for standing up for me Thomas. If you have any ideas about what is better please let me known. Cheers Nick On Fri, Jun 20, 2014 at 7:59 PM, Thomas Gleixner t...@linutronix.de wrote: On Fri, 20 Jun 2014, Nick Krause wrote: Ok that's fine I would return as if it's a NULL the other parts

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Andrew Morton
On Fri, 20 Jun 2014 22:25:47 -0400 Nick Krause xerofo...@gmail.com wrote: If you have any ideas about what is better please let me known. I think the proposed patch was not a good one - it will cause truncate to silently return, probably leaving the fs in an inconsistent state. Neither the

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
Fair enough if somebody is running this file system I would be happy to have someone test my code in order to fix this. Cheers Nick On Fri, Jun 20, 2014 at 10:38 PM, Andrew Morton a...@linux-foundation.org wrote: On Fri, 20 Jun 2014 22:25:47 -0400 Nick Krause xerofo...@gmail.com wrote: If you

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Andrew Morton
On Fri, 20 Jun 2014 22:55:07 -0400 Nick Krause xerofo...@gmail.com wrote: On Fri, Jun 20, 2014 at 10:38 PM, Andrew Morton a...@linux-foundation.org wrote: On Fri, 20 Jun 2014 22:25:47 -0400 Nick Krause xerofo...@gmail.com wrote: If you have any ideas about what is better please let me

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-20 Thread Nick Krause
I don't think that it's a good idea , in that case I would recommend either leaving this bug open or close it as there doesn't seem to be a good way of testing this. Cheers Nick On Fri, Jun 20, 2014 at 11:09 PM, Andrew Morton a...@linux-foundation.org wrote: On Fri, 20 Jun 2014 22:55:07 -0400

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-18 Thread Dan Carpenter
On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote: > Signed-off-by: Nicholas Krause > --- > fs/affs/file.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/affs/file.c b/fs/affs/file.c > index a7fe57d..f26482d 100644 > --- a/fs/affs/file.c > +++ b/fs/affs/file.c > @@

[PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-18 Thread Nicholas Krause
Signed-off-by: Nicholas Krause --- fs/affs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/affs/file.c b/fs/affs/file.c index a7fe57d..f26482d 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c @@ -923,6 +923,8 @@ affs_truncate(struct inode *inode) while (ext_key) {

[PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-18 Thread Nicholas Krause
Signed-off-by: Nicholas Krause xerofo...@gmail.com --- fs/affs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/affs/file.c b/fs/affs/file.c index a7fe57d..f26482d 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c @@ -923,6 +923,8 @@ affs_truncate(struct inode *inode)

Re: [PATCH] Check for Null return of function of affs_bread in function affs_truncate

2014-06-18 Thread Dan Carpenter
On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote: Signed-off-by: Nicholas Krause xerofo...@gmail.com --- fs/affs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/affs/file.c b/fs/affs/file.c index a7fe57d..f26482d 100644 --- a/fs/affs/file.c +++