summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index b21592528..5b582024e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -720,12 +720,9 @@ nfs_fhget(struct dentry *dentry, struct nfs_fh *fhandle,
if ((dentry->d_parent->d_inode->u.nfs_i.flags & NFS_IS_SNAPSHOT) ||
(dentry->d_name.len == 9 &&
memcmp(dentry->d_name.name, ".snapshot", 9) == 0)) {
- struct inode *inode = get_empty_inode();
+ struct inode *inode = new_inode(sb);
if (!inode)
- goto out;
- inode->i_sb = sb;
- inode->i_dev = sb->s_dev;
- inode->i_flags = 0;
+ goto out;
inode->i_ino = nfs_fattr_to_ino_t(fattr);
nfs_read_inode(inode);
nfs_fill_inode(inode, fattr);