diff options
Diffstat (limited to 'fs/logfs')
-rw-r--r-- | fs/logfs/dir.c | 4 | ||||
-rw-r--r-- | fs/logfs/file.c | 11 | ||||
-rw-r--r-- | fs/logfs/logfs.h | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 1afae26cf23..b3ff3d89416 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
@@ -371,11 +371,9 @@ static struct dentry *logfs_lookup(struct inode *dir, struct dentry *dentry, | |||
371 | page_cache_release(page); | 371 | page_cache_release(page); |
372 | 372 | ||
373 | inode = logfs_iget(dir->i_sb, ino); | 373 | inode = logfs_iget(dir->i_sb, ino); |
374 | if (IS_ERR(inode)) { | 374 | if (IS_ERR(inode)) |
375 | printk(KERN_ERR"LogFS: Cannot read inode #%llx for dentry (%lx, %lx)n", | 375 | printk(KERN_ERR"LogFS: Cannot read inode #%llx for dentry (%lx, %lx)n", |
376 | ino, dir->i_ino, index); | 376 | ino, dir->i_ino, index); |
377 | return ERR_CAST(inode); | ||
378 | } | ||
379 | return d_splice_alias(inode, dentry); | 377 | return d_splice_alias(inode, dentry); |
380 | } | 378 | } |
381 | 379 | ||
diff --git a/fs/logfs/file.c b/fs/logfs/file.c index c2ad7028def..b548c87a86f 100644 --- a/fs/logfs/file.c +++ b/fs/logfs/file.c | |||
@@ -219,11 +219,20 @@ long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | int logfs_fsync(struct file *file, int datasync) | 222 | int logfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) |
223 | { | 223 | { |
224 | struct super_block *sb = file->f_mapping->host->i_sb; | 224 | struct super_block *sb = file->f_mapping->host->i_sb; |
225 | struct inode *inode = file->f_mapping->host; | ||
226 | int ret; | ||
227 | |||
228 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | ||
229 | if (ret) | ||
230 | return ret; | ||
225 | 231 | ||
232 | mutex_lock(&inode->i_mutex); | ||
226 | logfs_write_anchor(sb); | 233 | logfs_write_anchor(sb); |
234 | mutex_unlock(&inode->i_mutex); | ||
235 | |||
227 | return 0; | 236 | return 0; |
228 | } | 237 | } |
229 | 238 | ||
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h index 57afd4a6fab..f22d108bfa5 100644 --- a/fs/logfs/logfs.h +++ b/fs/logfs/logfs.h | |||
@@ -506,7 +506,7 @@ extern const struct file_operations logfs_reg_fops; | |||
506 | extern const struct address_space_operations logfs_reg_aops; | 506 | extern const struct address_space_operations logfs_reg_aops; |
507 | int logfs_readpage(struct file *file, struct page *page); | 507 | int logfs_readpage(struct file *file, struct page *page); |
508 | long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | 508 | long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
509 | int logfs_fsync(struct file *file, int datasync); | 509 | int logfs_fsync(struct file *file, loff_t start, loff_t end, int datasync); |
510 | 510 | ||
511 | /* gc.c */ | 511 | /* gc.c */ |
512 | u32 get_best_cand(struct super_block *sb, struct candidate_list *list, u32 *ec); | 512 | u32 get_best_cand(struct super_block *sb, struct candidate_list *list, u32 *ec); |