mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
iget: stop BFS from using iget() and read_inode()
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 incurred when getting the root inode instead of EINVAL. [kamalesh@linux.vnet.ibm.com: build fix] Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
96eb541941
commit
e33ab086ae
3 changed files with 27 additions and 13 deletions
|
@ -148,10 +148,10 @@ static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry,
|
|||
if (bh) {
|
||||
unsigned long ino = (unsigned long)le16_to_cpu(de->ino);
|
||||
brelse(bh);
|
||||
inode = iget(dir->i_sb, ino);
|
||||
if (!inode) {
|
||||
inode = bfs_iget(dir->i_sb, ino);
|
||||
if (IS_ERR(inode)) {
|
||||
unlock_kernel();
|
||||
return ERR_PTR(-EACCES);
|
||||
return ERR_CAST(inode);
|
||||
}
|
||||
}
|
||||
unlock_kernel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue