summaryrefslogtreecommitdiff
path: root/fs/ext3/namei.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-10-30 10:08:25 (GMT)
committerTakashi Iwai <tiwai@suse.de>2012-10-30 10:08:25 (GMT)
commita5d00dc3a4b65ed38249f3225e453944c633747b (patch)
tree6249ca5a5f13059f42890525a9ea7133778f3891 /fs/ext3/namei.h
parent1a8506d4402b6e96c2ed778dc7ccbb48d1e02fce (diff)
parent0914f7961babbf28aaa2f19b453951fb4841c03f (diff)
downloadlinux-a5d00dc3a4b65ed38249f3225e453944c633747b.tar.xz
Merge branch 'for-linus' into for-next
... for migrating the core changes for USB-audio disconnection fixes
Diffstat (limited to 'fs/ext3/namei.h')
-rw-r--r--fs/ext3/namei.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/ext3/namei.h b/fs/ext3/namei.h
index f2ce2b0..46304d8 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;
+}