aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-01-06 03:19:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:55 -0500
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 fead7f49e2ca..9a6075de961f 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)
773 struct page *page; 773 struct page *page;
774 struct inode *inode = file->f_dentry->d_inode; 774 struct inode *inode = file->f_dentry->d_inode;
775 struct fuse_conn *fc = get_fuse_conn(inode); 775 struct fuse_conn *fc = get_fuse_conn(inode);
776 struct fuse_req *req = fuse_get_request(fc); 776 struct fuse_req *req;
777
778 if (is_bad_inode(inode))
779 return -EIO;
780
781 req = fuse_get_request(fc);
777 if (!req) 782 if (!req)
778 return -EINTR; 783 return -EINTR;
779 784