Lines Matching full:ui
285 struct ubifs_inode *ui = ubifs_inode(inode); in write_begin_slow() local
292 mutex_lock(&ui->ui_mutex); in write_begin_slow()
293 if (ui->dirty) in write_begin_slow()
298 ubifs_release_dirty_inode_budget(c, ui); in write_begin_slow()
309 * @ui: UBIFS inode object the page belongs to
315 * function leaves the @ui->ui_mutex locked in case of appending.
320 struct ubifs_inode *ui, int appending) in allocate_budget() argument
332 mutex_lock(&ui->ui_mutex); in allocate_budget()
333 if (ui->dirty) in allocate_budget()
338 * but @ui->ui_mutex hast to be left locked because we in allocate_budget()
369 mutex_lock(&ui->ui_mutex); in allocate_budget()
370 if (!ui->dirty) in allocate_budget()
421 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_write_begin() local
463 err = allocate_budget(c, folio, ui, appending); in ubifs_write_begin()
480 ubifs_assert(c, mutex_is_locked(&ui->ui_mutex)); in ubifs_write_begin()
481 mutex_unlock(&ui->ui_mutex); in ubifs_write_begin()
492 * with @ui->ui_mutex locked if we are appending pages, and unlocked in ubifs_write_begin()
503 * @ui: UBIFS inode object the page belongs to
507 * @ui->ui_mutex in case of appending.
510 struct ubifs_inode *ui, int appending) in cancel_budget() argument
513 if (!ui->dirty) in cancel_budget()
514 ubifs_release_dirty_inode_budget(c, ui); in cancel_budget()
515 mutex_unlock(&ui->ui_mutex); in cancel_budget()
530 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_write_end() local
550 cancel_budget(c, folio, ui, appending); in ubifs_write_end()
572 ui->ui_size = end_pos; in ubifs_write_end()
579 ubifs_assert(c, mutex_is_locked(&ui->ui_mutex)); in ubifs_write_end()
580 mutex_unlock(&ui->ui_mutex); in ubifs_write_end()
716 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_do_bulk_read() local
728 ui->read_in_a_row = 1; in ubifs_do_bulk_read()
729 ui->bulk_read = 0; in ubifs_do_bulk_read()
795 ui->last_page_read = offset + page_idx - 1; in ubifs_do_bulk_read()
807 ui->read_in_a_row = ui->bulk_read = 0; in ubifs_do_bulk_read()
826 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_bulk_read() local
827 pgoff_t index = folio->index, last_page_read = ui->last_page_read; in ubifs_bulk_read()
831 ui->last_page_read = index; in ubifs_bulk_read()
836 * Bulk-read is protected by @ui->ui_mutex, but it is an optimization, in ubifs_bulk_read()
839 if (!mutex_trylock(&ui->ui_mutex)) in ubifs_bulk_read()
844 ui->read_in_a_row = 1; in ubifs_bulk_read()
845 if (ui->bulk_read) in ubifs_bulk_read()
846 ui->bulk_read = 0; in ubifs_bulk_read()
850 if (!ui->bulk_read) { in ubifs_bulk_read()
851 ui->read_in_a_row += 1; in ubifs_bulk_read()
852 if (ui->read_in_a_row < 3) in ubifs_bulk_read()
855 ui->bulk_read = 1; in ubifs_bulk_read()
884 mutex_unlock(&ui->ui_mutex); in ubifs_bulk_read()
908 struct ubifs_inode *ui = ubifs_inode(inode); in do_writepage() local
909 spin_lock(&ui->ui_lock); in do_writepage()
910 ubifs_assert(c, folio->index <= ui->synced_i_size >> PAGE_SHIFT); in do_writepage()
911 spin_unlock(&ui->ui_lock); in do_writepage()
994 * @ui->ui_isize "shadow" field which UBIFS uses instead of @inode->i_size
1009 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_writepage() local
1023 spin_lock(&ui->ui_lock); in ubifs_writepage()
1024 synced_i_size = ui->synced_i_size; in ubifs_writepage()
1025 spin_unlock(&ui->ui_lock); in ubifs_writepage()
1125 struct ubifs_inode *ui = ubifs_inode(inode); in do_truncation() local
1195 mutex_lock(&ui->ui_mutex); in do_truncation()
1196 ui->ui_size = inode->i_size; in do_truncation()
1202 mutex_unlock(&ui->ui_mutex); in do_truncation()
1231 struct ubifs_inode *ui = ubifs_inode(inode); in do_setattr() local
1233 .dirtied_ino_d = ALIGN(ui->data_len, 8) }; in do_setattr()
1244 mutex_lock(&ui->ui_mutex); in do_setattr()
1249 ui->ui_size = inode->i_size; in do_setattr()
1254 release = ui->dirty; in do_setattr()
1263 mutex_unlock(&ui->ui_mutex); in do_setattr()
1394 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_update_time() local
1397 .dirtied_ino_d = ALIGN(ui->data_len, 8) }; in ubifs_update_time()
1409 mutex_lock(&ui->ui_mutex); in ubifs_update_time()
1411 release = ui->dirty; in ubifs_update_time()
1413 mutex_unlock(&ui->ui_mutex); in ubifs_update_time()
1432 struct ubifs_inode *ui = ubifs_inode(inode); in update_mctime() local
1438 .dirtied_ino_d = ALIGN(ui->data_len, 8) }; in update_mctime()
1444 mutex_lock(&ui->ui_mutex); in update_mctime()
1446 release = ui->dirty; in update_mctime()
1448 mutex_unlock(&ui->ui_mutex); in update_mctime()
1580 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_vm_page_mkwrite() local
1582 mutex_lock(&ui->ui_mutex); in ubifs_vm_page_mkwrite()
1584 release = ui->dirty; in ubifs_vm_page_mkwrite()
1586 mutex_unlock(&ui->ui_mutex); in ubifs_vm_page_mkwrite()
1588 ubifs_release_dirty_inode_budget(c, ui); in ubifs_vm_page_mkwrite()
1625 struct ubifs_inode *ui = ubifs_inode(inode); in ubifs_get_link() local
1628 return ui->data; in ubifs_get_link()
1633 return fscrypt_get_symlink(inode, ui->data, ui->data_len, done); in ubifs_get_link()