diff options
author | David Howells <dhowells@redhat.com> | 2015-01-29 07:02:36 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 11:38:41 -0500 |
commit | ce40fa78ef8f0e813392903c96de65b947298d16 (patch) | |
tree | 0b4a5db5feafed3cadaab68bd77d0c7e6b049ef1 /fs/cachefiles/daemon.c | |
parent | e36cb0b89ce20b4f8786a57e8a6bc8476f577650 (diff) |
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Fix up the following scripted S_ISDIR/S_ISREG/S_ISLNK conversions (or lack
thereof) in cachefiles:
(1) Cachefiles mostly wants to use d_can_lookup() rather than d_is_dir() as
it doesn't want to deal with automounts in its cache.
(2) Coccinelle didn't find S_IS* expressions in ASSERT() statements in
cachefiles.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cachefiles/daemon.c')
-rw-r--r-- | fs/cachefiles/daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index d92840209863..f601def05bdf 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c | |||
@@ -574,7 +574,7 @@ static int cachefiles_daemon_cull(struct cachefiles_cache *cache, char *args) | |||
574 | /* extract the directory dentry from the cwd */ | 574 | /* extract the directory dentry from the cwd */ |
575 | get_fs_pwd(current->fs, &path); | 575 | get_fs_pwd(current->fs, &path); |
576 | 576 | ||
577 | if (!d_is_dir(path.dentry)) | 577 | if (!d_can_lookup(path.dentry)) |
578 | goto notdir; | 578 | goto notdir; |
579 | 579 | ||
580 | cachefiles_begin_secure(cache, &saved_cred); | 580 | cachefiles_begin_secure(cache, &saved_cred); |
@@ -646,7 +646,7 @@ static int cachefiles_daemon_inuse(struct cachefiles_cache *cache, char *args) | |||
646 | /* extract the directory dentry from the cwd */ | 646 | /* extract the directory dentry from the cwd */ |
647 | get_fs_pwd(current->fs, &path); | 647 | get_fs_pwd(current->fs, &path); |
648 | 648 | ||
649 | if (!d_is_dir(path.dentry)) | 649 | if (!d_can_lookup(path.dentry)) |
650 | goto notdir; | 650 | goto notdir; |
651 | 651 | ||
652 | cachefiles_begin_secure(cache, &saved_cred); | 652 | cachefiles_begin_secure(cache, &saved_cred); |