UBIFS: fix minor stylistic issues
Fix several minor stylistic issues: * lines longer than 80 characters * space before closing parenthesis ')' * spaces in the indentations Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
@@ -2421,7 +2421,8 @@ int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head)
|
|||||||
hashb = key_block(c, &sb->key);
|
hashb = key_block(c, &sb->key);
|
||||||
|
|
||||||
if (hasha > hashb) {
|
if (hasha > hashb) {
|
||||||
ubifs_err("larger hash %u goes before %u", hasha, hashb);
|
ubifs_err("larger hash %u goes before %u",
|
||||||
|
hasha, hashb);
|
||||||
goto error_dump;
|
goto error_dump;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -971,11 +971,11 @@ static int do_writepage(struct page *page, int len)
|
|||||||
* the page locked, and it locks @ui_mutex. However, write-back does take inode
|
* the page locked, and it locks @ui_mutex. However, write-back does take inode
|
||||||
* @i_mutex, which means other VFS operations may be run on this inode at the
|
* @i_mutex, which means other VFS operations may be run on this inode at the
|
||||||
* same time. And the problematic one is truncation to smaller size, from where
|
* same time. And the problematic one is truncation to smaller size, from where
|
||||||
* we have to call 'truncate_setsize()', which first changes @inode->i_size, then
|
* we have to call 'truncate_setsize()', which first changes @inode->i_size,
|
||||||
* drops the truncated pages. And while dropping the pages, it takes the page
|
* then drops the truncated pages. And while dropping the pages, it takes the
|
||||||
* lock. This means that 'do_truncation()' cannot call 'truncate_setsize()' with
|
* page lock. This means that 'do_truncation()' cannot call 'truncate_setsize()'
|
||||||
* @ui_mutex locked, because it would deadlock with 'ubifs_writepage()'. This
|
* with @ui_mutex locked, because it would deadlock with 'ubifs_writepage()'.
|
||||||
* means that @inode->i_size is changed while @ui_mutex is unlocked.
|
* This means that @inode->i_size is changed while @ui_mutex is unlocked.
|
||||||
*
|
*
|
||||||
* XXX(truncate): with the new truncate sequence this is not true anymore,
|
* XXX(truncate): with the new truncate sequence this is not true anymore,
|
||||||
* and the calls to truncate_setsize can be move around freely. They should
|
* and the calls to truncate_setsize can be move around freely. They should
|
||||||
@@ -1432,10 +1432,11 @@ static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mmap()d file has taken write protection fault and is being made
|
* mmap()d file has taken write protection fault and is being made writable.
|
||||||
* writable. UBIFS must ensure page is budgeted for.
|
* UBIFS must ensure page is budgeted for.
|
||||||
*/
|
*/
|
||||||
static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
|
static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma,
|
||||||
|
struct vm_fault *vmf)
|
||||||
{
|
{
|
||||||
struct page *page = vmf->page;
|
struct page *page = vmf->page;
|
||||||
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
|
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
|
||||||
|
@@ -393,7 +393,7 @@ int ubifs_wbuf_sync_nolock(struct ubifs_wbuf *wbuf)
|
|||||||
ubifs_assert(wbuf->size % c->min_io_size == 0);
|
ubifs_assert(wbuf->size % c->min_io_size == 0);
|
||||||
ubifs_assert(!c->ro_media && !c->ro_mount);
|
ubifs_assert(!c->ro_media && !c->ro_mount);
|
||||||
if (c->leb_size - wbuf->offs >= c->max_write_size)
|
if (c->leb_size - wbuf->offs >= c->max_write_size)
|
||||||
ubifs_assert(!((wbuf->offs + wbuf->size) % c->max_write_size ));
|
ubifs_assert(!((wbuf->offs + wbuf->size) % c->max_write_size));
|
||||||
|
|
||||||
if (c->ro_error)
|
if (c->ro_error)
|
||||||
return -EROFS;
|
return -EROFS;
|
||||||
@@ -588,7 +588,7 @@ int ubifs_wbuf_write_nolock(struct ubifs_wbuf *wbuf, void *buf, int len)
|
|||||||
ubifs_assert(mutex_is_locked(&wbuf->io_mutex));
|
ubifs_assert(mutex_is_locked(&wbuf->io_mutex));
|
||||||
ubifs_assert(!c->ro_media && !c->ro_mount);
|
ubifs_assert(!c->ro_media && !c->ro_mount);
|
||||||
if (c->leb_size - wbuf->offs >= c->max_write_size)
|
if (c->leb_size - wbuf->offs >= c->max_write_size)
|
||||||
ubifs_assert(!((wbuf->offs + wbuf->size) % c->max_write_size ));
|
ubifs_assert(!((wbuf->offs + wbuf->size) % c->max_write_size));
|
||||||
|
|
||||||
if (c->leb_size - wbuf->offs - wbuf->used < aligned_len) {
|
if (c->leb_size - wbuf->offs - wbuf->used < aligned_len) {
|
||||||
err = -ENOSPC;
|
err = -ENOSPC;
|
||||||
|
@@ -673,7 +673,8 @@ static int kill_orphans(struct ubifs_info *c)
|
|||||||
sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1);
|
sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1);
|
||||||
if (IS_ERR(sleb)) {
|
if (IS_ERR(sleb)) {
|
||||||
if (PTR_ERR(sleb) == -EUCLEAN)
|
if (PTR_ERR(sleb) == -EUCLEAN)
|
||||||
sleb = ubifs_recover_leb(c, lnum, 0, c->sbuf, 0);
|
sleb = ubifs_recover_leb(c, lnum, 0,
|
||||||
|
c->sbuf, 0);
|
||||||
if (IS_ERR(sleb)) {
|
if (IS_ERR(sleb)) {
|
||||||
err = PTR_ERR(sleb);
|
err = PTR_ERR(sleb);
|
||||||
break;
|
break;
|
||||||
|
@@ -1144,7 +1144,7 @@ static int check_free_space(struct ubifs_info *c)
|
|||||||
{
|
{
|
||||||
ubifs_assert(c->dark_wm > 0);
|
ubifs_assert(c->dark_wm > 0);
|
||||||
if (c->lst.total_free + c->lst.total_dirty < c->dark_wm) {
|
if (c->lst.total_free + c->lst.total_dirty < c->dark_wm) {
|
||||||
ubifs_err("insufficient free space to mount in read/write mode");
|
ubifs_err("insufficient free space to mount in R/W mode");
|
||||||
dbg_dump_budg(c);
|
dbg_dump_budg(c);
|
||||||
dbg_dump_lprops(c);
|
dbg_dump_lprops(c);
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
|
@@ -389,9 +389,9 @@ struct ubifs_gced_idx_leb {
|
|||||||
* The @ui_size is a "shadow" variable for @inode->i_size and UBIFS uses
|
* The @ui_size is a "shadow" variable for @inode->i_size and UBIFS uses
|
||||||
* @ui_size instead of @inode->i_size. The reason for this is that UBIFS cannot
|
* @ui_size instead of @inode->i_size. The reason for this is that UBIFS cannot
|
||||||
* make sure @inode->i_size is always changed under @ui_mutex, because it
|
* make sure @inode->i_size is always changed under @ui_mutex, because it
|
||||||
* cannot call 'truncate_setsize()' with @ui_mutex locked, because it would deadlock
|
* cannot call 'truncate_setsize()' with @ui_mutex locked, because it would
|
||||||
* with 'ubifs_writepage()' (see file.c). All the other inode fields are
|
* deadlock with 'ubifs_writepage()' (see file.c). All the other inode fields
|
||||||
* changed under @ui_mutex, so they do not need "shadow" fields. Note, one
|
* are changed under @ui_mutex, so they do not need "shadow" fields. Note, one
|
||||||
* could consider to rework locking and base it on "shadow" fields.
|
* could consider to rework locking and base it on "shadow" fields.
|
||||||
*/
|
*/
|
||||||
struct ubifs_inode {
|
struct ubifs_inode {
|
||||||
|
Reference in New Issue
Block a user