diff options
author | Jan Kara <jack@suse.cz> | 2022-10-05 19:26:59 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-01-09 10:39:52 +0100 |
commit | 4cca7e3df7bea8661a0c2a70c0d250e9aa5cedb4 (patch) | |
tree | 18b86fc6907bba4c847414800ecc204554b5bd47 /fs/udf/namei.c | |
parent | afb525f466f9fdc140b975221cb43fbb5c59314e (diff) |
udf: Provide function to mark entry as deleted using new directory iteration code
Provide function udf_fiiter_delete_entry() to mark directory entry as
deleted using new directory iteration code.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/namei.c')
-rw-r--r-- | fs/udf/namei.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 964ac7d4e274..f38ed9c1b54d 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -711,6 +711,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) |