aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 417bcee466f6..21fd59c7bc24 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -23,8 +23,7 @@
23/* 23/*
24 * Calculate the time in jiffies until a dentry/attributes are valid 24 * Calculate the time in jiffies until a dentry/attributes are valid
25 */ 25 */
26static inline unsigned long time_to_jiffies(unsigned long sec, 26static unsigned long time_to_jiffies(unsigned long sec, unsigned long nsec)
27 unsigned long nsec)
28{ 27{
29 struct timespec ts = {sec, nsec}; 28 struct timespec ts = {sec, nsec};
30 return jiffies + timespec_to_jiffies(&ts); 29 return jiffies + timespec_to_jiffies(&ts);
@@ -157,7 +156,7 @@ static int dir_alias(struct inode *inode)
157 return 0; 156 return 0;
158} 157}
159 158
160static inline int invalid_nodeid(u64 nodeid) 159static int invalid_nodeid(u64 nodeid)
161{ 160{
162 return !nodeid || nodeid == FUSE_ROOT_ID; 161 return !nodeid || nodeid == FUSE_ROOT_ID;
163} 162}
@@ -166,7 +165,7 @@ static struct dentry_operations fuse_dentry_operations = {
166 .d_revalidate = fuse_dentry_revalidate, 165 .d_revalidate = fuse_dentry_revalidate,
167}; 166};
168 167
169static inline int valid_mode(int m) 168static int valid_mode(int m)
170{ 169{
171 return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) || 170 return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) ||
172 S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m); 171 S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
@@ -763,13 +762,6 @@ static int parse_dirfile(char *buf, size_t nbytes, struct file *file,
763 return 0; 762 return 0;
764} 763}
765 764
766static inline size_t fuse_send_readdir(struct fuse_req *req, struct file *file,
767 struct inode *inode, loff_t pos,
768 size_t count)
769{
770 return fuse_send_read_common(req, file, inode, pos, count, 1);
771}
772
773static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) 765static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir)
774{ 766{
775 int err; 767 int err;
@@ -793,7 +785,9 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir)
793 } 785 }
794 req->num_pages = 1; 786 req->num_pages = 1;
795 req->pages[0] = page; 787 req->pages[0] = page;
796 nbytes = fuse_send_readdir(req, file, inode, file->f_pos, PAGE_SIZE); 788 fuse_read_fill(req, file, inode, file->f_pos, PAGE_SIZE, FUSE_READDIR);
789 request_send(fc, req);
790 nbytes = req->out.args[0].size;
797 err = req->out.h.error; 791 err = req->out.h.error;
798 fuse_put_request(fc, req); 792 fuse_put_request(fc, req);
799 if (!err) 793 if (!err)