summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/daemon.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-01-29 12:02:36 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-22 11:38:41 -0500
commitce40fa78ef8f0e813392903c96de65b947298d16 (patch)
tree0b4a5db5feafed3cadaab68bd77d0c7e6b049ef1 /fs/cachefiles/daemon.c
parente36cb0b89ce20b4f8786a57e8a6bc8476f577650 (diff)
downloadblackbird-op-linux-ce40fa78ef8f0e813392903c96de65b947298d16.tar.gz
blackbird-op-linux-ce40fa78ef8f0e813392903c96de65b947298d16.zip
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.c4
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)
/* extract the directory dentry from the cwd */
get_fs_pwd(current->fs, &path);
- if (!d_is_dir(path.dentry))
+ if (!d_can_lookup(path.dentry))
goto notdir;
cachefiles_begin_secure(cache, &saved_cred);
@@ -646,7 +646,7 @@ static int cachefiles_daemon_inuse(struct cachefiles_cache *cache, char *args)
/* extract the directory dentry from the cwd */
get_fs_pwd(current->fs, &path);
- if (!d_is_dir(path.dentry))
+ if (!d_can_lookup(path.dentry))
goto notdir;
cachefiles_begin_secure(cache, &saved_cred);
OpenPOWER on IntegriCloud