Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255063
b: refs/heads/master
c: d808efb
h: refs/heads/master
i:
  255061: 36fece0
  255059: 5e27018
  255055: 3cd190a
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jul 4, 2011
1 parent d92caa9 commit b311243
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 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: bb2615d4d14777fd37e2b91bd99b92c0354813d1
refs/heads/master: d808efb407e1a2cf83a8d21411157195f26bdef9
3 changes: 2 additions & 1 deletion trunk/fs/ubifs/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,14 +1132,15 @@ int dbg_check_space_info(struct ubifs_info *c)

/**
* dbg_check_synced_i_size - check synchronized inode size.
* @c: UBIFS file-system description object
* @inode: inode to check
*
* If inode is clean, synchronized inode size has to be equivalent to current
* inode size. This function has to be called only for locked inodes (@i_mutex
* has to be locked). Returns %0 if synchronized inode size if correct, and
* %-EINVAL if not.
*/
int dbg_check_synced_i_size(struct inode *inode)
int dbg_check_synced_i_size(const struct ubifs_info *c, struct inode *inode)
{
int err = 0;
struct ubifs_inode *ui = ubifs_inode(inode);
Expand Down
6 changes: 4 additions & 2 deletions trunk/fs/ubifs/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ int dbg_check_cats(struct ubifs_info *c);
int dbg_check_ltab(struct ubifs_info *c);
int dbg_chk_lpt_free_spc(struct ubifs_info *c);
int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len);
int dbg_check_synced_i_size(struct inode *inode);
int dbg_check_synced_i_size(const struct ubifs_info *c, struct inode *inode);
int dbg_check_dir(struct ubifs_info *c, const struct inode *dir);
int dbg_check_tnc(struct ubifs_info *c, int extra);
int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
Expand Down Expand Up @@ -416,7 +416,9 @@ static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; }
static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; }
static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
int action, int len) { return 0; }
static inline int dbg_check_synced_i_size(struct inode *inode) { return 0; }
static inline int
dbg_check_synced_i_size(const struct ubifs_info *c,
struct inode *inode) { return 0; }
static inline int dbg_check_dir(struct ubifs_info *c,
const struct inode *dir) { return 0; }
static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; }
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir,
ubifs_assert(mutex_is_locked(&dir->i_mutex));
ubifs_assert(mutex_is_locked(&inode->i_mutex));

err = dbg_check_synced_i_size(inode);
err = dbg_check_synced_i_size(c, inode);
if (err)
return err;

Expand Down Expand Up @@ -579,7 +579,7 @@ static int ubifs_unlink(struct inode *dir, struct dentry *dentry)
inode->i_nlink, dir->i_ino);
ubifs_assert(mutex_is_locked(&dir->i_mutex));
ubifs_assert(mutex_is_locked(&inode->i_mutex));
err = dbg_check_synced_i_size(inode);
err = dbg_check_synced_i_size(c, inode);
if (err)
return err;

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ubifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ int ubifs_setattr(struct dentry *dentry, struct iattr *attr)
if (err)
return err;

err = dbg_check_synced_i_size(inode);
err = dbg_check_synced_i_size(c, inode);
if (err)
return err;

Expand Down

0 comments on commit b311243

Please sign in to comment.