diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 18:12:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 18:12:38 -0700 |
commit | 5d5c5dca9c2db027770e44c69a73ea7f3919dcfc (patch) | |
tree | 68a9673c5a56874f36dda62dd724e5509479d6c3 /fs/ext3/namei.h | |
parent | ecb2ecd9c241de16ebb31b7dc441dbbfc0f6006e (diff) | |
parent | 6c29c50fda25c2ac2ce45a9b042ff7e424aa8eac (diff) | |
download | linux-5d5c5dca9c2db027770e44c69a73ea7f3919dcfc.tar.gz |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, ext3, quota fixes from Jan Kara:
"Fix three regressions caused by user namespace conversions (ext2,
ext3, quota) and minor ext3 fix and cleanup."
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
quota: Silence warning about PRJQUOTA not being handled in need_print_warning()
ext3: fix return values on parse_options() failure
ext2: fix return values on parse_options() failure
ext3: ext3_bread usage audit
ext3: fix possible non-initialized variable on htree_dirblock_to_tree()
Diffstat (limited to 'fs/ext3/namei.h')
-rw-r--r-- | fs/ext3/namei.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/ext3/namei.h b/fs/ext3/namei.h index f2ce2b0065c9..46304d8c9f0a 100644 --- a/fs/ext3/namei.h +++ b/fs/ext3/namei.h @@ -6,3 +6,22 @@ */ extern struct dentry *ext3_get_parent(struct dentry *child); + +static inline struct buffer_head *ext3_dir_bread(handle_t *handle, + struct inode *inode, + int block, int create, + int *err) +{ + struct buffer_head *bh; + + bh = ext3_bread(handle, inode, block, create, err); + + if (!bh && !(*err)) { + *err = -EIO; + ext3_error(inode->i_sb, __func__, + "Directory hole detected on inode %lu\n", + inode->i_ino); + return NULL; + } + return bh; +} |