diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index d41505862..31d76e5c6 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -78,7 +78,7 @@ struct inode_operations nfs_dir_inode_operations = { nfs_rename, /* rename */ NULL, /* readlink */ NULL, /* follow_link */ - NULL, /* bmap */ + NULL, /* get_block */ NULL, /* readpage */ NULL, /* writepage */ NULL, /* flushpage */ @@ -884,6 +884,8 @@ static int nfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) nfs_flush_dircache(dir); error = nfs_proc_mkdir(NFS_DSERVER(dentry), NFS_FH(dentry->d_parent), dentry->d_name.name, &sattr, &fhandle, &fattr); + if (!error) + dir->i_nlink++; return error; } @@ -909,8 +911,8 @@ dentry->d_inode->i_count, dentry->d_inode->i_nlink); /* Update i_nlink and invalidate dentry. */ if (!error) { d_drop(dentry); - if (dentry->d_inode->i_nlink) - dentry->d_inode->i_nlink --; + if (dir->i_nlink) + dir->i_nlink--; } return error; |