From d3d17b82c29040cacf8e04c3def0eb552c4e3693 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 28 Apr 2010 23:22:33 +0200 Subject: fs: Fix d_count fallout d_count got converted to int and back to atomic_t. Two instances were missed in the backward conversion. Fix them up. Signed-off-by: Thomas Gleixner --- fs/ecryptfs/inode.c | 2 +- fs/hpfs/namei.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 2fb8fd148cac..23dc2af56dc6 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -263,7 +263,7 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry, ecryptfs_dentry->d_parent)); lower_inode = lower_dentry->d_inode; fsstack_copy_attr_atime(ecryptfs_dir_inode, lower_dir_dentry->d_inode); - BUG_ON(!lower_dentry->d_count); + BUG_ON(!atomic_read(&lower_dentry->d_count)); ecryptfs_set_dentry_private(ecryptfs_dentry, kmem_cache_alloc(ecryptfs_dentry_info_cache, GFP_KERNEL)); diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 2f088e6277d6..82b9c4ba9ed0 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -415,7 +415,7 @@ again: mutex_unlock(&hpfs_i(inode)->i_parent_mutex); d_drop(dentry); spin_lock(&dentry->d_lock); - if (dentry->d_count > 1 || + if (atomic_read(&dentry->d_count) > 1 || generic_permission(inode, MAY_WRITE, NULL) || !S_ISREG(inode->i_mode) || get_write_access(inode)) { -- cgit v1.2.3