From: Jan Kara <jack@xxxxxxx> [ Upstream commit 4cca7e3df7bea8661a0c2a70c0d250e9aa5cedb4 ] Provide function udf_fiiter_delete_entry() to mark directory entry as deleted using new directory iteration code. Signed-off-by: Jan Kara <jack@xxxxxxx> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/udf/namei.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -714,6 +714,16 @@ out_ok: return fi; } +static void udf_fiiter_delete_entry(struct udf_fileident_iter *iter) +{ + iter->fi.fileCharacteristics |= FID_FILE_CHAR_DELETED; + + if (UDF_QUERY_FLAG(iter->dir->i_sb, UDF_FLAG_STRICT)) + memset(&iter->fi.icb, 0x00, sizeof(struct long_ad)); + + udf_fiiter_write_fi(iter, NULL); +} + static int udf_delete_entry(struct inode *inode, struct fileIdentDesc *fi, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi) Patches currently in stable-queue which might be from cascardo@xxxxxxxxxx are queue-6.1/udf-handle-error-when-expanding-directory.patch queue-6.1/udf-convert-empty_dir-to-new-directory-iteration-code.patch queue-6.1/udf-convert-udf_expand_dir_adinicb-to-new-directory-iteration.patch queue-6.1/udf-convert-udf_unlink-to-new-directory-iteration-code.patch queue-6.1/udf-convert-udf_add_nondir-to-new-directory-iteration.patch queue-6.1/udf-convert-udf_link-to-new-directory-iteration-code.patch queue-6.1/udf-remove-old-directory-iteration-code.patch queue-6.1/udf-don-t-return-bh-from-udf_expand_dir_adinicb.patch queue-6.1/udf-new-directory-iteration-code.patch queue-6.1/udf-convert-udf_rmdir-to-new-directory-iteration-code.patch queue-6.1/udf-move-udf_expand_dir_adinicb-to-its-callsite.patch queue-6.1/udf-convert-udf_readdir-to-new-directory-iteration.patch queue-6.1/udf-convert-udf_mkdir-to-new-directory-iteration-code.patch queue-6.1/udf-provide-function-to-mark-entry-as-deleted-using-new-directory-iteration-code.patch queue-6.1/udf-convert-udf_lookup-to-use-new-directory-iteration-code.patch queue-6.1/udf-implement-adding-of-dir-entries-using-new-iteration-code.patch queue-6.1/udf-convert-udf_rename-to-new-directory-iteration-code.patch queue-6.1/udf-convert-udf_get_parent-to-new-directory-iteration-code.patch queue-6.1/udf-implement-searching-for-directory-entry-using-new-iteration-code.patch