aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/interface.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-01-29 07:02:36 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-22 11:38:41 -0500
commitce40fa78ef8f0e813392903c96de65b947298d16 (patch)
tree0b4a5db5feafed3cadaab68bd77d0c7e6b049ef1 /fs/cachefiles/interface.c
parente36cb0b89ce20b4f8786a57e8a6bc8476f577650 (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/interface.c')
-rw-r--r--fs/cachefiles/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c
index 1c7293c3a93a..232426214fdd 100644
--- a/fs/cachefiles/interface.c
+++ b/fs/cachefiles/interface.c
@@ -437,7 +437,7 @@ static int cachefiles_attr_changed(struct fscache_object *_object)
437 if (!object->backer) 437 if (!object->backer)
438 return -ENOBUFS; 438 return -ENOBUFS;
439 439
440 ASSERT(S_ISREG(object->backer->d_inode->i_mode)); 440 ASSERT(d_is_reg(object->backer));
441 441
442 fscache_set_store_limit(&object->fscache, ni_size); 442 fscache_set_store_limit(&object->fscache, ni_size);
443 443
@@ -501,7 +501,7 @@ static void cachefiles_invalidate_object(struct fscache_operation *op)
501 op->object->debug_id, (unsigned long long)ni_size); 501 op->object->debug_id, (unsigned long long)ni_size);
502 502
503 if (object->backer) { 503 if (object->backer) {
504 ASSERT(S_ISREG(object->backer->d_inode->i_mode)); 504 ASSERT(d_is_reg(object->backer));
505 505
506 fscache_set_store_limit(&object->fscache, ni_size); 506 fscache_set_store_limit(&object->fscache, ni_size);
507 507