diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-04-28 23:22:33 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-28 23:27:03 +0200 |
commit | d3d17b82c29040cacf8e04c3def0eb552c4e3693 (patch) | |
tree | 384ce177125191f2a52a9512ad57ac2c1627a27c | |
parent | 5e022ed205b9408a98822d291a4c2b9dd675a91e (diff) | |
download | lwn-d3d17b82c29040cacf8e04c3def0eb552c4e3693.tar.gz lwn-d3d17b82c29040cacf8e04c3def0eb552c4e3693.zip |
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 <tglx@linutronix.de>
-rw-r--r-- | fs/ecryptfs/inode.c | 2 | ||||
-rw-r--r-- | 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)) { |