Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108537
b: refs/heads/master
c: fbfa6c8
h: refs/heads/master
i:
  108535: 38625f3
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Aug 13, 2008
1 parent f483a09 commit b6bb69d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: ff46d7b3e0870a70331b069372c36fbc43018c2d
refs/heads/master: fbfa6c884aae2aff479eb8c996c564b1a34eae30
18 changes: 13 additions & 5 deletions trunk/fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static void ubifs_destroy_inode(struct inode *inode)
*/
static int ubifs_write_inode(struct inode *inode, int wait)
{
int err;
int err = 0;
struct ubifs_info *c = inode->i_sb->s_fs_info;
struct ubifs_inode *ui = ubifs_inode(inode);

Expand All @@ -299,10 +299,18 @@ static int ubifs_write_inode(struct inode *inode, int wait)
return 0;
}

dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode);
err = ubifs_jnl_write_inode(c, inode, 0);
if (err)
ubifs_err("can't write inode %lu, error %d", inode->i_ino, err);
/*
* As an optimization, do not write orphan inodes to the media just
* because this is not needed.
*/
dbg_gen("inode %lu, mode %#x, nlink %u",
inode->i_ino, (int)inode->i_mode, inode->i_nlink);
if (inode->i_nlink) {
err = ubifs_jnl_write_inode(c, inode, 0);
if (err)
ubifs_err("can't write inode %lu, error %d",
inode->i_ino, err);
}

ui->dirty = 0;
mutex_unlock(&ui->ui_mutex);
Expand Down

0 comments on commit b6bb69d

Please sign in to comment.