Skip to content

Commit c2b19fd

Browse files
committed
Merge tag 'fs_for_v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull udf and quota fixes from Jan Kara: "Fixes for crashes in UDF when inode expansion fails and one quota cleanup" * tag 'fs_for_v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: cleanup double word in comment udf: Restore i_lenAlloc when inode expansion fails udf: Fix NULL ptr deref when converting from inline format
2 parents 145d9b4 + 9daf0a4 commit c2b19fd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

fs/udf/inode.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,6 @@ int udf_expand_file_adinicb(struct inode *inode)
258258
char *kaddr;
259259
struct udf_inode_info *iinfo = UDF_I(inode);
260260
int err;
261-
struct writeback_control udf_wbc = {
262-
.sync_mode = WB_SYNC_NONE,
263-
.nr_to_write = 1,
264-
};
265261

266262
WARN_ON_ONCE(!inode_is_locked(inode));
267263
if (!iinfo->i_lenAlloc) {
@@ -305,8 +301,10 @@ int udf_expand_file_adinicb(struct inode *inode)
305301
iinfo->i_alloc_type = ICBTAG_FLAG_AD_LONG;
306302
/* from now on we have normal address_space methods */
307303
inode->i_data.a_ops = &udf_aops;
304+
set_page_dirty(page);
305+
unlock_page(page);
308306
up_write(&iinfo->i_data_sem);
309-
err = inode->i_data.a_ops->writepage(page, &udf_wbc);
307+
err = filemap_fdatawrite(inode->i_mapping);
310308
if (err) {
311309
/* Restore everything back so that we don't lose data... */
312310
lock_page(page);
@@ -317,6 +315,7 @@ int udf_expand_file_adinicb(struct inode *inode)
317315
unlock_page(page);
318316
iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB;
319317
inode->i_data.a_ops = &udf_adinicb_aops;
318+
iinfo->i_lenAlloc = inode->i_size;
320319
up_write(&iinfo->i_data_sem);
321320
}
322321
put_page(page);

include/linux/quota.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extern bool qid_valid(struct kqid qid);
9191
*
9292
* When there is no mapping defined for the user-namespace, type,
9393
* qid tuple an invalid kqid is returned. Callers are expected to
94-
* test for and handle handle invalid kqids being returned.
94+
* test for and handle invalid kqids being returned.
9595
* Invalid kqids may be tested for using qid_valid().
9696
*/
9797
static inline struct kqid make_kqid(struct user_namespace *from,

0 commit comments

Comments
 (0)