goto out_unlock;
}
error = -EACCES;
- inode = nfs_fhget(dentry, &fhandle, &fattr);
+ inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr);
if (!inode)
goto out_unlock;
no_entry:
if (error)
goto out_err;
}
- inode = nfs_fhget(dentry, fhandle, fattr);
+ inode = nfs_fhget(dentry->d_sb, fhandle, fattr);
if (inode) {
d_instantiate(dentry, inode);
nfs_renew_times(dentry);
*/
#define NFS_MAX_READAHEAD RPC_MAXREQS
-static struct inode * __nfs_fhget(struct super_block *, struct nfs_fh *, struct nfs_fattr *);
void nfs_zap_caches(struct inode *);
static void nfs_invalidate_inode(struct inode *);
return error;
}
- *rooti = __nfs_fhget(sb, rootfh, &fattr);
+ *rooti = nfs_fhget(sb, rootfh, &fattr);
if (error == -EACCES && authflavor > RPC_AUTH_MAXFLAVOR) {
if (*rooti) {
NFS_FLAGS(*rooti) |= NFS_INO_FAKE_ROOT;
return 0;
}
-/*
- * This is our own version of iget that looks up inodes by file handle
- * instead of inode number. We use this technique instead of using
- * the vfs read_inode function because there is no way to pass the
- * file handle or current attributes into the read_inode function.
- *
- */
-struct inode *
-nfs_fhget(struct dentry *dentry, struct nfs_fh *fhandle,
- struct nfs_fattr *fattr)
-{
- struct super_block *sb = dentry->d_sb;
-
- dprintk("NFS: nfs_fhget(%s/%s fileid=%Ld)\n",
- dentry->d_parent->d_name.name, dentry->d_name.name,
- (long long)fattr->fileid);
- return __nfs_fhget(sb, fhandle, fattr);
-}
-
/* Don't use READDIRPLUS on directories that we believe are too large */
#define NFS_LIMIT_READDIRPLUS (8*PAGE_SIZE)
/*
- * Look up the inode by super block and fattr->fileid.
+ * This is our front-end to iget that looks up inodes by file handle
+ * instead of inode number.
*/
-static struct inode *
-__nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
+struct inode *
+nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
{
struct nfs_find_desc desc = {
.fh = fh,
unlock_new_inode(inode);
} else
nfs_refresh_inode(inode, fattr);
- dprintk("NFS: __nfs_fhget(%s/%Ld ct=%d)\n",
+ dprintk("NFS: nfs_fhget(%s/%Ld ct=%d)\n",
inode->i_sb->s_id,
(long long)NFS_FILEID(inode),
atomic_read(&inode->i_count));
return inode;
out_no_inode:
- printk("__nfs_fhget: iget failed\n");
+ printk("nfs_fhget: iget failed\n");
goto out;
}
* linux/fs/nfs/inode.c
*/
extern void nfs_zap_caches(struct inode *);
-extern struct inode *nfs_fhget(struct dentry *, struct nfs_fh *,
+extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *,
struct nfs_fattr *);
extern int __nfs_refresh_inode(struct inode *, struct nfs_fattr *);
extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);