- 24 9月, 2021 7 次提交
-
-
由 Konstantin Komarov 提交于
In case of removing of xattr there must be XATTR_REPLACE flag and zero length. We already check XATTR_REPLACE in ntfs_set_ea, so now we pass XATTR_REPLACE to ntfs_set_ea. Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Konstantin Komarov 提交于
We can safely move set_cached_acl because it works with NULL acl too. Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Konstantin Komarov 提交于
Now ntfs3 locks mutex for smaller time. Theoretically in successful cases those locks aren't needed at all. But proving the same for error cases is difficult. So instead of removing them we just move them. Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Konstantin Komarov 提交于
We need to always call indx_delete_entry after indx_insert_entry if error occurred. Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Some discussion has been spoken that this deprecated mount options should be removed before 5.15 lands. This driver is not never seen day light so it was decided that nls mount option has to be removed. We have always possibility to add this if needed. One possible need is example if current ntfs driver will be taken out of kernel and ntfs3 needs to support mount options what it has. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Christophe JAILLET 提交于
There is already a 'u8 mask' defined at the top of the function. There is no need to define a new one here. Remove the useless and shadowing new 'mask' variable. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Christophe JAILLET 提交于
'fnd' has been dereferenced several time before, so testing it here is pointless. Moreover, all callers of 'indx_find()' already have some error handling code that makes sure that no NULL 'fnd' is passed. So, remove the useless test. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
- 21 9月, 2021 3 次提交
-
-
由 Konstantin Komarov 提交于
This allows to wait only when it's requested. It speeds up creation of hardlinks. Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Konstantin Komarov 提交于
xfstest generic/041 works with 3003 hardlinks. Because of this we raise hardlinks limit to 4000. There are no drawbacks or regressions. Theoretically we can raise all the way up to ffff, but there is no practical use for this. Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Konstantin Komarov 提交于
Do not try to insert attribute if there is no room in record. Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
- 20 9月, 2021 13 次提交
-
-
由 Colin Ian King 提交于
Currently a failed allocation on sbi->upcase will cause an exit via the label free_sbi causing a memory leak on object opts. Fix this by re-ordering the exit paths free_opts and free_sbi so that kfree's occur in the reverse allocation order. Addresses-Coverity: ("Resource leak") Fixes: 27fac777 ("fs/ntfs3: Init spi more in init_fs_context than fill_super") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Current ntfs3 rst documentation is broken. I turn table to list table as this is current Linux documentation quide line. Simple table also did not quite work in our situation as we need to span rows together. It still look quite good as text so we did not loss anything. This will also make diffing quite bit more pleasure. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Right now sb blocksize first get initiliazed in fill_super but in can be changed in helper function. It makes more sense to that this happened only in one place. Because we move this to helper function it makes more sense that s_maxbytes will also be there. I rather have every sb releted thing in fill_super, but because there is already sb releted stuff in this helper. This will have to do for now. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Initializing should be as close as possible when we use it so that we do not need to scroll up to see what is happening. Also bdev_get_queue() can never return NULL so we do not need to check for !rq. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We can survive without this tmp point upcase. So remove it we don't have so many tmp pointer in this function. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Drop tmp pointer bd_inode because this is only used ones in fill_super. Also we have so many initializing happening at the beginning that it is already way too much to follow. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We only use this in two places so we do not really need it. Also wrapper sb_rdonly() is pretty self explanatory. This will make little bit easier to read this super long variable list in the beginning of ntfs_fill_super(). Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Use sb instead of sbi->sb in fill_super. We have sb so why not use it. Also makes code more readable. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Remove some unnecessary variable loading. These look like copy paste work and they are not used to anything. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
In many places it is not needed to use goto out. We can just return right away. This will make code little bit more cleaner as we won't need to check error path. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Remove root drop when we fault out. This can never happened because when we allocate root we eather fault when no root or success. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Change EINVAL to ENOMEM when d_make_root fails because that is right errno. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Fix wrong error message $Logfile -> $UpCase. Probably copy paste. Fixes: 203c2b3a406a ("fs/ntfs3: Add initialization of super block") Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
- 16 9月, 2021 8 次提交
-
-
由 Kari Argillander 提交于
We can make code little bit more readable by using min/max macros. These were found with Coccinelle. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We can make code little more readable by using kernel macros clamp/max. This were found with kernel included Coccinelle minmax script. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We do not need this check as this is same thing as NTFS_MIN_MFT_ZONE > zlen. We already check NTFS_MIN_MFT_ZONE <= zlen and exit because is too big request. Remove it so code is cleaner. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
If ntfs_refresh_zone() returns error it will be changed to -ENOSPC. It is not right. Also caller of this functions also check other errors. Fixes: 78ab59fe ("fs/ntfs3: Rework file operations") Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Remove tabs before spaces from comment as recommended by kernel coding style. Checkpatch also warn about these. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Remove braces from single statment block as they are not needed. Also Linux kernel coding style guide recommend this and checkpatch warn about this. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
For better code readability place constant always right side of the test. This will also address checkpatch warning. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
No need for plus sign here. So remove it. Checkpatch will also be happy. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
- 14 9月, 2021 9 次提交
-
-
由 Kari Argillander 提交于
We do not have any reason to keep old linear search in. Before this was used for error path or if table was so big that it cannot be allocated. Current binary search implementation won't need error path. Remove old references to linear entry search. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We could try to optimize algorithm to first fill just small table and after that use bigger table all the way up to ARRAY_SIZE(offs). This way we can use bigger search array, but not lose benefits with entry count smaller < ARRAY_SIZE(offs). Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
Current binary search allocates memory for table and fill whole table before we start actual binary search. This is quite inefficient because table fill will always be O(n). Also if table is huge we need to reallocate memory which is costly. This implementation use just stack memory and always when table is full we will check if last element is <= and if not start table fill again. The idea was that it would be same cost as table reallocation. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We have lot of unnecessary headers in these files. Remove them so that we help compiler a little bit. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
There is lot of headers which we do not need in this file. Delete them and add what we really need. Here is list which identify why we need this header. <linux/kernel.h> // min() <linux/slab.h> // kzalloc() <linux/stddef.h> // offsetof() <linux/string.h> // memcpy(), memset() <linux/types.h> // u8, size_t, etc. "debug.h" // PtrOffset() Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
There is no headers. They will be included through ntfs_fs.c, but that is not right thing to do. Let's include headers what this file need straight away. types.h is needed for __le16, u8 etc. kernel.h is needed for le16_to_cpu() Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We only need linux/types.h for types like u8 etc. So we can remove rest and help compiler a little bit. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
size_t needs header. Add missing header guards so that compiler will only include these ones. Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-
由 Kari Argillander 提交于
We do not have headers at all in this file. We should have them so that not every .c file needs to include all of the stuff which this file need for building. This way we can remove some headers from other files and get better picture what is needed. This can save some compilation time. And this can help if we sometimes want to separate this one big header. Also use forward declarations for structs and enums when it not included straight with include and it is used in function declarations input. This will prevent possible compiler warning: xxx declared inside parameter list will not be visible outside of this definition or declaration Here is list which I made when parsing this. There is not necessarily all example from this header file, but this just proofs we need it. <linux/blkdev.h> SECTOR_SHIFT <linux/buffer_head.h> sb_bread(), put_bh <linux/cleancache.h> put_page() <linux/fs.h> struct inode (Just struct ntfs_inode need it) <linux/highmem.h> kunmap(), kmap() <linux/kernel.h> cpu_to_leXX() ALIGN <linux/mm.h> kvfree() <linux/mutex.h> struct mutex, mutex_(un/try)lock() <linux/page-flags.h> PageError() <linux/pagemap.h> read_mapping_page() <linux/rbtree.h> struct rb_root <linux/rwsem.h> struct rw_semaphore <linux/slab.h> krfree(), kzalloc() <linux/string.h> memset() <linux/time64.h> struct timespec64 <linux/types.h> uXX, __leXX <linux/uidgid.h> kuid_t, kgid_t <asm/div64.h> do_div() <asm/page.h> PAGE_SIZE "debug.h" ntfs_err() (Just one entry. Maybe we can drop this) "ntfs.h" Do you even ask? Signed-off-by: NKari Argillander <kari.argillander@gmail.com> Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
-