Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358986
b: refs/heads/master
c: d4686d5
h: refs/heads/master
v: v3
  • Loading branch information
Jaegeuk Kim committed Feb 11, 2013
1 parent e1d69f4 commit 5f3c779
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 369a708c2a6557fabd409cf17a03db271c54931a
refs/heads/master: d4686d56ec912d55fd8a9d6d509de50de24e90ab
1 change: 0 additions & 1 deletion trunk/fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ long f2fs_ioctl(struct file *, unsigned int, unsigned long);
* inode.c
*/
void f2fs_set_inode_flags(struct inode *);
struct inode *f2fs_iget_nowait(struct super_block *, unsigned long);
struct inode *f2fs_iget(struct super_block *, unsigned long);
void update_inode(struct inode *, struct page *);
int f2fs_write_inode(struct inode *, struct writeback_control *);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ void f2fs_truncate(struct inode *inode)
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
mark_inode_dirty(inode);
}

f2fs_balance_fs(F2FS_SB(inode->i_sb));
}

static int f2fs_getattr(struct vfsmount *mnt,
Expand Down Expand Up @@ -356,6 +354,7 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
attr->ia_size != i_size_read(inode)) {
truncate_setsize(inode, attr->ia_size);
f2fs_truncate(inode);
f2fs_balance_fs(F2FS_SB(inode->i_sb));
}

__setattr_copy(inode, attr);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/f2fs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
ofs_in_node = le16_to_cpu(entry->ofs_in_node);

if (phase == 2) {
inode = f2fs_iget_nowait(sb, dni.ino);
inode = f2fs_iget(sb, dni.ino);
if (IS_ERR(inode))
continue;

Expand Down
33 changes: 0 additions & 33 deletions trunk/fs/f2fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
#include "f2fs.h"
#include "node.h"

struct f2fs_iget_args {
u64 ino;
int on_free;
};

void f2fs_set_inode_flags(struct inode *inode)
{
unsigned int flags = F2FS_I(inode)->i_flags;
Expand All @@ -40,34 +35,6 @@ void f2fs_set_inode_flags(struct inode *inode)
inode->i_flags |= S_DIRSYNC;
}

static int f2fs_iget_test(struct inode *inode, void *data)
{
struct f2fs_iget_args *args = data;

if (inode->i_ino != args->ino)
return 0;
if (inode->i_state & (I_FREEING | I_WILL_FREE)) {
args->on_free = 1;
return 0;
}
return 1;
}

struct inode *f2fs_iget_nowait(struct super_block *sb, unsigned long ino)
{
struct f2fs_iget_args args = {
.ino = ino,
.on_free = 0
};
struct inode *inode = ilookup5(sb, ino, f2fs_iget_test, &args);

if (inode)
return inode;
if (!args.on_free)
return f2fs_iget(sb, ino);
return ERR_PTR(-ENOENT);
}

static int do_read_inode(struct inode *inode)
{
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/f2fs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
f2fs_put_page(node_page, 1);

/* Deallocate previous index in the node page */
inode = f2fs_iget_nowait(sbi->sb, ino);
inode = f2fs_iget(sbi->sb, ino);
if (IS_ERR(inode))
return;

Expand Down

0 comments on commit 5f3c779

Please sign in to comment.