diff options
Diffstat (limited to 'fs/9p/vfs_dentry.c')
-rw-r--r-- | fs/9p/vfs_dentry.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index 062daa6000ab..ddffd8aa902d 100644 --- a/fs/9p/vfs_dentry.c +++ b/fs/9p/vfs_dentry.c | |||
@@ -53,10 +53,31 @@ | |||
53 | static int v9fs_dentry_delete(struct dentry *dentry) | 53 | static int v9fs_dentry_delete(struct dentry *dentry) |
54 | { | 54 | { |
55 | dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); | 55 | dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); |
56 | |||
56 | return 1; | 57 | return 1; |
57 | } | 58 | } |
58 | 59 | ||
59 | /** | 60 | /** |
61 | * v9fs_cached_dentry_delete - called when dentry refcount equals 0 | ||
62 | * @dentry: dentry in question | ||
63 | * | ||
64 | * Only return 1 if our inode is invalid. Only non-synthetic files | ||
65 | * (ones without mtime == 0) should be calling this function. | ||
66 | * | ||
67 | */ | ||
68 | |||
69 | static int v9fs_cached_dentry_delete(struct dentry *dentry) | ||
70 | { | ||
71 | struct inode *inode = dentry->d_inode; | ||
72 | dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); | ||
73 | |||
74 | if(!inode) | ||
75 | return 1; | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | /** | ||
60 | * v9fs_dentry_release - called when dentry is going to be freed | 81 | * v9fs_dentry_release - called when dentry is going to be freed |
61 | * @dentry: dentry that is being release | 82 | * @dentry: dentry that is being release |
62 | * | 83 | * |
@@ -87,6 +108,11 @@ void v9fs_dentry_release(struct dentry *dentry) | |||
87 | } | 108 | } |
88 | } | 109 | } |
89 | 110 | ||
111 | struct dentry_operations v9fs_cached_dentry_operations = { | ||
112 | .d_delete = v9fs_cached_dentry_delete, | ||
113 | .d_release = v9fs_dentry_release, | ||
114 | }; | ||
115 | |||
90 | struct dentry_operations v9fs_dentry_operations = { | 116 | struct dentry_operations v9fs_dentry_operations = { |
91 | .d_delete = v9fs_dentry_delete, | 117 | .d_delete = v9fs_dentry_delete, |
92 | .d_release = v9fs_dentry_release, | 118 | .d_release = v9fs_dentry_release, |