summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-01-06 00:19:39 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:33:55 -0800
commit248d86e87d12da19eee602075f05a49a5215288b (patch)
treedd6a1159db054102100b2dd37e67022a65dbcf73 /fs/fuse/dir.c
parent6f9f11806af8ad3a107714a3ece56c1c4fafd047 (diff)
[PATCH] fuse: fail file operations on bad inode
Make file operations on a bad inode fail. This just makes things a bit more consistent. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index fead7f49e2c..9a6075de961 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -773,7 +773,12 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir)
struct page *page;
struct inode *inode = file->f_dentry->d_inode;
struct fuse_conn *fc = get_fuse_conn(inode);
- struct fuse_req *req = fuse_get_request(fc);
+ struct fuse_req *req;
+
+ if (is_bad_inode(inode))
+ return -EIO;
+
+ req = fuse_get_request(fc);
if (!req)
return -EINTR;