summaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index e21bb4668201..c1493524da4d 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -638,7 +638,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry)
dput(ino->dentry);
dentry->d_inode->i_size = 0;
- dentry->d_inode->i_nlink = 0;
+ clear_nlink(dentry->d_inode);
dir->i_mtime = CURRENT_TIME;
@@ -673,7 +673,7 @@ static int autofs4_dir_rmdir(struct inode *dir, struct dentry *dentry)
}
dput(ino->dentry);
dentry->d_inode->i_size = 0;
- dentry->d_inode->i_nlink = 0;
+ clear_nlink(dentry->d_inode);
if (dir->i_nlink)
drop_nlink(dir);