mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
udf: fix adding entry to a directory
When adding directory entry to a directory, we have to properly increase length of the last extent. Handle this similarly as extending regular files - make extents always have size multiple of block size (it will be truncated down to proper size in udf_clear_inode()). Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
af793295bf
commit
05343c4f2e
2 changed files with 11 additions and 10 deletions
|
@ -289,7 +289,7 @@ struct buffer_head *udf_expand_dir_adinicb(struct inode *inode, int *block,
|
|||
eloc.logicalBlockNum = *block;
|
||||
eloc.partitionReferenceNum =
|
||||
iinfo->i_location.partitionReferenceNum;
|
||||
elen = inode->i_size;
|
||||
elen = inode->i_sb->s_blocksize;
|
||||
iinfo->i_lenExtents = elen;
|
||||
epos.bh = NULL;
|
||||
epos.block = iinfo->i_location;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue