diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 11:50:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 11:50:26 -0400 |
commit | 45d9a2220f6004b47c362cc7fc7cf9a73cb6353a (patch) | |
tree | 4e2217464c5cd71674a6ffff1f3dddaeb52556b7 /fs/dcache.c | |
parent | 2386a3b0fbb0c2dcf29694c7df9a72cb268458f0 (diff) | |
parent | 02afc27faec94c9e068517a22acf55400976c698 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile 1 from Al Viro:
"Unfortunately, this merge window it'll have a be a lot of small piles -
my fault, actually, for not keeping #for-next in anything that would
resemble a sane shape ;-/
This pile: assorted fixes (the first 3 are -stable fodder, IMO) and
cleanups + %pd/%pD formats (dentry/file pathname, up to 4 last
components) + several long-standing patches from various folks.
There definitely will be a lot more (starting with Miklos'
check_submount_and_drop() series)"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
direct-io: Handle O_(D)SYNC AIO
direct-io: Implement generic deferred AIO completions
add formats for dentry/file pathnames
kvm eventfd: switch to fdget
powerpc kvm: use fdget
switch fchmod() to fdget
switch epoll_ctl() to fdget
switch copy_module_from_fd() to fdget
git simplify nilfs check for busy subtree
ibmasmfs: don't bother passing superblock when not needed
don't pass superblock to hypfs_{mkdir,create*}
don't pass superblock to hypfs_diag_create_files
don't pass superblock to hypfs_vm_create_files()
oprofile: get rid of pointless forward declarations of struct super_block
oprofilefs_create_...() do not need superblock argument
oprofilefs_mkdir() doesn't need superblock argument
don't bother with passing superblock to oprofile_create_stats_files()
oprofile: don't bother with passing superblock to ->create_files()
don't bother passing sb to oprofile_create_files()
coh901318: don't open-code simple_read_from_buffer()
...
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 96655f4f4574..5aa53bc056ba 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -472,7 +472,7 @@ relock: | |||
472 | * inform the fs via d_prune that this dentry is about to be | 472 | * inform the fs via d_prune that this dentry is about to be |
473 | * unhashed and destroyed. | 473 | * unhashed and destroyed. |
474 | */ | 474 | */ |
475 | if (dentry->d_flags & DCACHE_OP_PRUNE) | 475 | if ((dentry->d_flags & DCACHE_OP_PRUNE) && !d_unhashed(dentry)) |
476 | dentry->d_op->d_prune(dentry); | 476 | dentry->d_op->d_prune(dentry); |
477 | 477 | ||
478 | dentry_lru_del(dentry); | 478 | dentry_lru_del(dentry); |
@@ -727,6 +727,14 @@ restart: | |||
727 | hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { | 727 | hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { |
728 | spin_lock(&dentry->d_lock); | 728 | spin_lock(&dentry->d_lock); |
729 | if (!dentry->d_lockref.count) { | 729 | if (!dentry->d_lockref.count) { |
730 | /* | ||
731 | * inform the fs via d_prune that this dentry | ||
732 | * is about to be unhashed and destroyed. | ||
733 | */ | ||
734 | if ((dentry->d_flags & DCACHE_OP_PRUNE) && | ||
735 | !d_unhashed(dentry)) | ||
736 | dentry->d_op->d_prune(dentry); | ||
737 | |||
730 | __dget_dlock(dentry); | 738 | __dget_dlock(dentry); |
731 | __d_drop(dentry); | 739 | __d_drop(dentry); |
732 | spin_unlock(&dentry->d_lock); | 740 | spin_unlock(&dentry->d_lock); |
@@ -911,7 +919,8 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry) | |||
911 | * inform the fs that this dentry is about to be | 919 | * inform the fs that this dentry is about to be |
912 | * unhashed and destroyed. | 920 | * unhashed and destroyed. |
913 | */ | 921 | */ |
914 | if (dentry->d_flags & DCACHE_OP_PRUNE) | 922 | if ((dentry->d_flags & DCACHE_OP_PRUNE) && |
923 | !d_unhashed(dentry)) | ||
915 | dentry->d_op->d_prune(dentry); | 924 | dentry->d_op->d_prune(dentry); |
916 | 925 | ||
917 | dentry_lru_del(dentry); | 926 | dentry_lru_del(dentry); |