projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'dm-4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[cascardo/linux.git]
/
fs
/
afs
/
dir.c
diff --git
a/fs/afs/dir.c
b/fs/afs/dir.c
index
5fda2bc
..
eba5410
100644
(file)
--- a/
fs/afs/dir.c
+++ b/
fs/afs/dir.c
@@
-43,7
+43,7
@@
static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
const struct file_operations afs_dir_file_operations = {
.open = afs_dir_open,
.release = afs_release,
const struct file_operations afs_dir_file_operations = {
.open = afs_dir_open,
.release = afs_release,
- .iterate
= afs_readdir,
+ .iterate
_shared
= afs_readdir,
.lock = afs_lock,
.llseek = generic_file_llseek,
};
.lock = afs_lock,
.llseek = generic_file_llseek,
};
@@
-128,7
+128,7
@@
struct afs_lookup_cookie {
/*
* check that a directory page is valid
*/
/*
* check that a directory page is valid
*/
-static inline
void
afs_dir_check_page(struct inode *dir, struct page *page)
+static inline
bool
afs_dir_check_page(struct inode *dir, struct page *page)
{
struct afs_dir_page *dbuf;
loff_t latter;
{
struct afs_dir_page *dbuf;
loff_t latter;
@@
-168,11
+168,11
@@
static inline void afs_dir_check_page(struct inode *dir, struct page *page)
}
SetPageChecked(page);
}
SetPageChecked(page);
- return;
+ return
true
;
error:
error:
- SetPageChecked(page);
SetPageError(page);
SetPageError(page);
+ return false;
}
/*
}
/*
@@
-196,10
+196,10
@@
static struct page *afs_dir_get_page(struct inode *dir, unsigned long index,
page = read_cache_page(dir->i_mapping, index, afs_page_filler, key);
if (!IS_ERR(page)) {
kmap(page);
page = read_cache_page(dir->i_mapping, index, afs_page_filler, key);
if (!IS_ERR(page)) {
kmap(page);
- if (
!PageChecked(page))
- afs_dir_check_page(dir, page);
- if (PageError(page))
- goto fail;
+ if (
unlikely(!PageChecked(page))) {
+ if (PageError(page) || !afs_dir_check_page(dir, page))
+ goto fail;
+ }
}
return page;
}
return page;