diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-07 17:36:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-07 17:36:57 -0400 |
commit | dc0755cdb16cb129c4054c85d62bce83a18bcbcf (patch) | |
tree | 17f585ce18524ec029cb1169cdba256c83288101 /include/linux/dcache.h | |
parent | c7c4591db64dbd1e504bc4e2806d7ef290a3c81b (diff) | |
parent | f0d3b3ded999daae1cf451d051018038c0a05bae (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile 2 (of many) from Al Viro:
"Mostly Miklos' series this time"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
constify dcache.c inlined helpers where possible
fuse: drop dentry on failed revalidate
fuse: clean up return in fuse_dentry_revalidate()
fuse: use d_materialise_unique()
sysfs: use check_submounts_and_drop()
nfs: use check_submounts_and_drop()
gfs2: use check_submounts_and_drop()
afs: use check_submounts_and_drop()
vfs: check unlinked ancestors before mount
vfs: check submounts and drop atomically
vfs: add d_walk()
vfs: restructure d_genocide()
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 9169b91ea2d2..fe50f3db3af9 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -212,7 +212,7 @@ struct dentry_operations { | |||
212 | 212 | ||
213 | extern seqlock_t rename_lock; | 213 | extern seqlock_t rename_lock; |
214 | 214 | ||
215 | static inline int dname_external(struct dentry *dentry) | 215 | static inline int dname_external(const struct dentry *dentry) |
216 | { | 216 | { |
217 | return dentry->d_name.name != dentry->d_iname; | 217 | return dentry->d_name.name != dentry->d_iname; |
218 | } | 218 | } |
@@ -253,6 +253,7 @@ extern void d_prune_aliases(struct inode *); | |||
253 | 253 | ||
254 | /* test whether we have any submounts in a subdir tree */ | 254 | /* test whether we have any submounts in a subdir tree */ |
255 | extern int have_submounts(struct dentry *); | 255 | extern int have_submounts(struct dentry *); |
256 | extern int check_submounts_and_drop(struct dentry *); | ||
256 | 257 | ||
257 | /* | 258 | /* |
258 | * This adds the entry to the hash queues. | 259 | * This adds the entry to the hash queues. |
@@ -357,17 +358,17 @@ extern struct dentry *dget_parent(struct dentry *dentry); | |||
357 | * Returns true if the dentry passed is not currently hashed. | 358 | * Returns true if the dentry passed is not currently hashed. |
358 | */ | 359 | */ |
359 | 360 | ||
360 | static inline int d_unhashed(struct dentry *dentry) | 361 | static inline int d_unhashed(const struct dentry *dentry) |
361 | { | 362 | { |
362 | return hlist_bl_unhashed(&dentry->d_hash); | 363 | return hlist_bl_unhashed(&dentry->d_hash); |
363 | } | 364 | } |
364 | 365 | ||
365 | static inline int d_unlinked(struct dentry *dentry) | 366 | static inline int d_unlinked(const struct dentry *dentry) |
366 | { | 367 | { |
367 | return d_unhashed(dentry) && !IS_ROOT(dentry); | 368 | return d_unhashed(dentry) && !IS_ROOT(dentry); |
368 | } | 369 | } |
369 | 370 | ||
370 | static inline int cant_mount(struct dentry *dentry) | 371 | static inline int cant_mount(const struct dentry *dentry) |
371 | { | 372 | { |
372 | return (dentry->d_flags & DCACHE_CANT_MOUNT); | 373 | return (dentry->d_flags & DCACHE_CANT_MOUNT); |
373 | } | 374 | } |
@@ -381,12 +382,12 @@ static inline void dont_mount(struct dentry *dentry) | |||
381 | 382 | ||
382 | extern void dput(struct dentry *); | 383 | extern void dput(struct dentry *); |
383 | 384 | ||
384 | static inline bool d_managed(struct dentry *dentry) | 385 | static inline bool d_managed(const struct dentry *dentry) |
385 | { | 386 | { |
386 | return dentry->d_flags & DCACHE_MANAGED_DENTRY; | 387 | return dentry->d_flags & DCACHE_MANAGED_DENTRY; |
387 | } | 388 | } |
388 | 389 | ||
389 | static inline bool d_mountpoint(struct dentry *dentry) | 390 | static inline bool d_mountpoint(const struct dentry *dentry) |
390 | { | 391 | { |
391 | return dentry->d_flags & DCACHE_MOUNTED; | 392 | return dentry->d_flags & DCACHE_MOUNTED; |
392 | } | 393 | } |