Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-11 Thread David Howells
Roel Kluin <[EMAIL PROTECTED]> wrote: > > + if (IS_ERR(inode)) > > + return ERR_PTR(-ENOMEM); > > + if (!(inode->i_state & I_NEW)) > > + return inode; > > Don't you have to unlock_new_inode(inode) before returning? In the first case, no because an OOM error was returned

Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-11 Thread David Howells
Roel Kluin [EMAIL PROTECTED] wrote: + if (IS_ERR(inode)) + return ERR_PTR(-ENOMEM); + if (!(inode-i_state I_NEW)) + return inode; Don't you have to unlock_new_inode(inode) before returning? In the first case, no because an OOM error was returned rather than an

Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-10 Thread Roel Kluin
It is very well possible that I misunderstand the locking order here, but FWIW: David Howells wrote: > diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c > index f346eb1..76798c9 100644 > --- a/fs/bfs/inode.c > +++ b/fs/bfs/inode.c > @@ -32,25 +32,29 @@ MODULE_LICENSE("GPL"); > > void

[PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the BFS filesystem from using iget() and read_inode(). Replace bfs_read_inode() with bfs_iget(), and call that instead of iget(). bfs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. bfs_fill_super() returns any error

[PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the BFS filesystem from using iget() and read_inode(). Replace bfs_read_inode() with bfs_iget(), and call that instead of iget(). bfs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. bfs_fill_super() returns any error

Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-10 Thread Roel Kluin
It is very well possible that I misunderstand the locking order here, but FWIW: David Howells wrote: diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index f346eb1..76798c9 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -32,25 +32,29 @@ MODULE_LICENSE(GPL); void dump_imap(const char