login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
10
Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Roel Kluin <12o3l@...>
To: David Howells <dhowells@...>
Cc: <hch@...>, <viro@...>, <torvalds@...>, <akpm@...>, <linux-kernel@...>, <linux-fsdevel@...>
Subject:
Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]
Date: Wednesday, October 10, 2007 - 8:54 pm
It is very well possible that I misunderstand the locking order here, but FWIW: David Howells wrote:
quoted text
> 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 *prefix, struct super_block * s); > > -static void bfs_read_inode(struct inode * inode) > +struct inode *bfs_iget(struct super_block *sb, unsigned long ino) > { > - unsigned long ino = inode->i_ino; > struct bfs_inode * di; > struct buffer_head * bh; > + struct inode *inode; > int block, off; > > + inode = iget_locked(sb, ino);
after this
quoted text
> + 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?
quoted text
> + > if (ino < BFS_ROOT_INO || ino > BFS_SB(inode->i_sb)->si_lasti) { > printf("Bad inode number %s:%08lx\n", inode->i_sb->s_id, ino); > - make_bad_inode(inode); > - return; > + goto error; > } > > block = (ino - BFS_ROOT_INO)/BFS_INODES_PER_BLOCK + 1; > bh = sb_bread(inode->i_sb, block); > if (!bh) { > printf("Unable to read inode %s:%08lx\n", inode->i_sb->s_id, ino); > - make_bad_inode(inode); > - return; > + goto error; > } > > off = (ino - BFS_ROOT_INO) % BFS_INODES_PER_BLOCK; > @@ -85,6 +89,12 @@ static void bfs_read_inode(struct inode * inode) > BFS_I(inode)->i_dsk_ino = le16_to_cpu(di->i_ino); /* can be 0 so we store a copy */ > > brelse(bh); > + unlock_new_inode(inode); > + return inode; > + > +error:
and also here?
quoted text
> + iget_failed(inode); > + return ERR_PTR(-EIO); > }
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 00/31] Remove iget() and read_inode() [try #3]
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 28/31] IGET: Stop OPENPROMFS from using iget() and re...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 29/31] IGET: Stop HOSTFS from using iget() and read_i...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 31/31] IGET: Remove iget() and the read_inode() super...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 30/31] IGET: Stop HPPFS from using iget() and read_in...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 25/31] IGET: Stop ROMFS from using iget() and read_in...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 27/31] IGET: Stop UFS from using iget() and read_inod...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 26/31] IGET: Stop the SYSV filesystem from using iget...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 23/31] IGET: Stop PROCFS from using iget() and read_i...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 24/31] IGET: Stop QNX4 from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 22/31] IGET: Stop the MINIX filesystem from using ige...
, David Howells
, (Wed Oct 10, 5:45 pm)
[PATCH 21/31] IGET: Stop JFS from using iget() and read_inod...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 19/31] IGET: Stop ISOFS from using read_inode() [try ...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 20/31] IGET: Stop JFFS2 from using iget() and read_in...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 18/31] IGET: Stop HFSPLUS from using iget() and read_...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 17/31] IGET: Stop FUSE from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 16/31] IGET: Stop FreeVXFS from using iget() and read...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 15/31] IGET: Stop FAT from using iget() and read_inod...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 14/31] IGET: Stop EXT4 from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 13/31] IGET: Stop EXT3 from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 11/31] IGET: Stop EFS from using iget() and read_inod...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 12/31] IGET: Stop EXT2 from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:44 pm)
[PATCH 09/31] IGET: Stop BFS from using iget() and read_inod...
, David Howells
, (Wed Oct 10, 5:43 pm)
Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_...
, Roel Kluin
, (Wed Oct 10, 8:54 pm)
Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_...
, David Howells
, (Thu Oct 11, 3:39 am)
[PATCH 08/31] IGET: Stop BEFS from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 10/31] IGET: Stop CIFS from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 07/31] IGET: Stop autofs from using iget() and read_i...
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 06/31] IGET: Stop AFFS from using iget() and read_ino...
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 05/31] IGET: Use iget_failed() in GFS2 [try #3]
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 04/31] IGET: Use iget_failed() in AFS [try #3]
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 03/31] IGET: Introduce a function to register iget fa...
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 02/31] Convert ERR_PTR(PTR_ERR(p)) instances to ERR_C...
, David Howells
, (Wed Oct 10, 5:43 pm)
[PATCH 01/31] Add an ERR_CAST() macro to complement ERR_PTR ...
, David Howells
, (Wed Oct 10, 5:43 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Alan Cox
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Andrew Morton
2.6.23-rc6-mm1
jjohansen
[AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Linus Torvalds
Re: [GIT]: Networking
Mark Lord
Re: 2.6.25-rc8: FTP transfer errors
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
644 guests
online.
Syndicate