diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index a2ceb94b0e38..ca648685f0cc 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -287,23 +287,17 @@ extern char *dentry_path(struct dentry *, char *, int); | |||
287 | /* Allocation counts.. */ | 287 | /* Allocation counts.. */ |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * dget, dget_locked - get a reference to a dentry | 290 | * dget, dget_dlock - get a reference to a dentry |
291 | * @dentry: dentry to get a reference to | 291 | * @dentry: dentry to get a reference to |
292 | * | 292 | * |
293 | * Given a dentry or %NULL pointer increment the reference count | 293 | * Given a dentry or %NULL pointer increment the reference count |
294 | * if appropriate and return the dentry. A dentry will not be | 294 | * if appropriate and return the dentry. A dentry will not be |
295 | * destroyed when it has references. dget() should never be | 295 | * destroyed when it has references. |
296 | * called for dentries with zero reference counter. For these cases | ||
297 | * (preferably none, functions in dcache.c are sufficient for normal | ||
298 | * needs and they take necessary precautions) you should hold d_lock | ||
299 | * and call dget_dlock() instead of dget(). | ||
300 | */ | 296 | */ |
301 | static inline struct dentry *dget_dlock(struct dentry *dentry) | 297 | static inline struct dentry *dget_dlock(struct dentry *dentry) |
302 | { | 298 | { |
303 | if (dentry) { | 299 | if (dentry) |
304 | BUG_ON(!dentry->d_count); | ||
305 | dentry->d_count++; | 300 | dentry->d_count++; |
306 | } | ||
307 | return dentry; | 301 | return dentry; |
308 | } | 302 | } |
309 | 303 | ||
@@ -317,9 +311,6 @@ static inline struct dentry *dget(struct dentry *dentry) | |||
317 | return dentry; | 311 | return dentry; |
318 | } | 312 | } |
319 | 313 | ||
320 | extern struct dentry * dget_locked(struct dentry *); | ||
321 | extern struct dentry * dget_locked_dlock(struct dentry *); | ||
322 | |||
323 | extern struct dentry *dget_parent(struct dentry *dentry); | 314 | extern struct dentry *dget_parent(struct dentry *dentry); |
324 | 315 | ||
325 | /** | 316 | /** |