Skip to content

Commit 911daf6

Browse files
fs/ntfs3: Fix formatting, change comments, renaming
Huacai Chen: The label end_reply is obviously a typo. It should be "replay" in this context. So rename end_reply to end_replay. Suggested-by: Huacai Chen <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 2fef55d commit 911daf6

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
lines changed

fs/ntfs3/attrib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ int attr_make_nonresident(struct ntfs_inode *ni, struct ATTRIB *attr,
291291
struct address_space *mapping = ni->vfs_inode.i_mapping;
292292
struct folio *folio;
293293

294-
folio = __filemap_get_folio(mapping, 0,
295-
FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
296-
mapping_gfp_mask(mapping));
294+
folio = __filemap_get_folio(
295+
mapping, 0, FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
296+
mapping_gfp_mask(mapping));
297297
if (IS_ERR(folio)) {
298298
err = PTR_ERR(folio);
299299
goto out2;

fs/ntfs3/file.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ int ntfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry,
105105
return 0;
106106
}
107107

108+
/*
109+
* ntfs_ioctl - file_operations::unlocked_ioctl
110+
*/
108111
long ntfs_ioctl(struct file *filp, u32 cmd, unsigned long arg)
109112
{
110113
struct inode *inode = file_inode(filp);
@@ -260,9 +263,9 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
260263
PAGE_SIZE;
261264
iblock = page_off >> inode->i_blkbits;
262265

263-
folio = __filemap_get_folio(mapping, idx,
264-
FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
265-
mapping_gfp_constraint(mapping, ~__GFP_FS));
266+
folio = __filemap_get_folio(
267+
mapping, idx, FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
268+
mapping_gfp_constraint(mapping, ~__GFP_FS));
266269
if (IS_ERR(folio))
267270
return PTR_ERR(folio);
268271

@@ -887,7 +890,8 @@ static int ntfs_get_frame_pages(struct address_space *mapping, pgoff_t index,
887890
struct folio *folio;
888891

889892
folio = __filemap_get_folio(mapping, index,
890-
FGP_LOCK | FGP_ACCESSED | FGP_CREAT, gfp_mask);
893+
FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
894+
gfp_mask);
891895
if (IS_ERR(folio)) {
892896
while (npages--) {
893897
folio = page_folio(pages[npages]);
@@ -1258,7 +1262,7 @@ static int ntfs_file_release(struct inode *inode, struct file *file)
12581262
}
12591263

12601264
/*
1261-
* ntfs_fiemap - file_operations::fiemap
1265+
* ntfs_fiemap - inode_operations::fiemap
12621266
*/
12631267
int ntfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
12641268
__u64 start, __u64 len)

fs/ntfs3/fslog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ static bool check_rstbl(const struct RESTART_TABLE *rt, size_t bytes)
724724

725725
if (!rsize || rsize > bytes ||
726726
rsize + sizeof(struct RESTART_TABLE) > bytes || bytes < ts ||
727-
le16_to_cpu(rt->total) > ne ||
728-
ff > ts - sizeof(__le32) || lf > ts - sizeof(__le32) ||
727+
le16_to_cpu(rt->total) > ne || ff > ts - sizeof(__le32) ||
728+
lf > ts - sizeof(__le32) ||
729729
(ff && ff < sizeof(struct RESTART_TABLE)) ||
730730
(lf && lf < sizeof(struct RESTART_TABLE))) {
731731
return false;
@@ -4690,7 +4690,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
46904690
* table are not empty.
46914691
*/
46924692
if ((!dptbl || !dptbl->total) && (!trtbl || !trtbl->total))
4693-
goto end_reply;
4693+
goto end_replay;
46944694

46954695
sbi->flags |= NTFS_FLAGS_NEED_REPLAY;
46964696
if (is_ro)
@@ -5119,7 +5119,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
51195119

51205120
sbi->flags &= ~NTFS_FLAGS_NEED_REPLAY;
51215121

5122-
end_reply:
5122+
end_replay:
51235123

51245124
err = 0;
51255125
if (is_ro)

fs/ntfs3/inode.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ static noinline int ntfs_get_block_vbo(struct inode *inode, u64 vbo,
578578
bh->b_blocknr = RESIDENT_LCN;
579579
bh->b_size = block_size;
580580
if (!folio) {
581+
/* direct io (read) or bmap call */
581582
err = 0;
582583
} else {
583584
ni_lock(ni);
@@ -911,9 +912,9 @@ int ntfs_write_begin(struct file *file, struct address_space *mapping,
911912

912913
*pagep = NULL;
913914
if (is_resident(ni)) {
914-
struct folio *folio = __filemap_get_folio(mapping,
915-
pos >> PAGE_SHIFT, FGP_WRITEBEGIN,
916-
mapping_gfp_mask(mapping));
915+
struct folio *folio = __filemap_get_folio(
916+
mapping, pos >> PAGE_SHIFT, FGP_WRITEBEGIN,
917+
mapping_gfp_mask(mapping));
917918

918919
if (IS_ERR(folio)) {
919920
err = PTR_ERR(folio);

fs/ntfs3/namei.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir,
112112
}
113113

114114
/*
115-
* ntfs_mknod
116-
*
117-
* inode_operations::mknod
115+
* ntfs_mknod - inode_operations::mknod
118116
*/
119117
static int ntfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
120118
struct dentry *dentry, umode_t mode, dev_t rdev)

0 commit comments

Comments
 (0)