From d3624466b56dd5b1886c1dff500525b544c19c83 Mon Sep 17 00:00:00 2001 From: Konstantin Komarov Date: Tue, 31 Aug 2021 16:57:40 +0300 Subject: fs/ntfs3: Restyle comments to better align with kernel-doc Signed-off-by: Konstantin Komarov --- fs/ntfs3/attrib.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'fs/ntfs3/attrib.c') diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c index ffc323bacc9f..34c4cbf7e29b 100644 --- a/fs/ntfs3/attrib.c +++ b/fs/ntfs3/attrib.c @@ -199,6 +199,7 @@ int attr_allocate_clusters(struct ntfs_sb_info *sbi, struct runs_tree *run, /* Add new fragment into run storage. */ if (!run_add_entry(run, vcn, lcn, flen, opt == ALLOCATE_MFT)) { + /* Undo last 'ntfs_look_for_free_space' */ down_write_nested(&wnd->rw_lock, BITMAP_MUTEX_CLUSTERS); wnd_set_free(wnd, lcn, flen); up_write(&wnd->rw_lock); @@ -351,7 +352,6 @@ out2: run_close(run); out1: kfree(attr_s); - /* Reinsert le. */ out: return err; } @@ -1153,14 +1153,18 @@ int attr_load_runs_vcn(struct ntfs_inode *ni, enum ATTR_TYPE type, u16 ro; attr = ni_find_attr(ni, NULL, NULL, type, name, name_len, &vcn, NULL); - if (!attr) + if (!attr) { + /* Is record corrupted? */ return -ENOENT; + } svcn = le64_to_cpu(attr->nres.svcn); evcn = le64_to_cpu(attr->nres.evcn); - if (evcn < vcn || vcn < svcn) + if (evcn < vcn || vcn < svcn) { + /* Is record corrupted? */ return -EINVAL; + } ro = le16_to_cpu(attr->nres.run_off); err = run_unpack_ex(run, ni->mi.sbi, ni->mi.rno, svcn, evcn, svcn, @@ -1171,7 +1175,7 @@ int attr_load_runs_vcn(struct ntfs_inode *ni, enum ATTR_TYPE type, } /* - * attr_wof_load_runs_range - Load runs for given range [from to). + * attr_load_runs_range - Load runs for given range [from to). */ int attr_load_runs_range(struct ntfs_inode *ni, enum ATTR_TYPE type, const __le16 *name, u8 name_len, struct runs_tree *run, @@ -1974,7 +1978,7 @@ int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) total_size = le64_to_cpu(attr_b->nres.total_size); if (vbo >= alloc_size) { - // NOTE: It is allowed. + /* NOTE: It is allowed. */ return 0; } @@ -1986,9 +1990,9 @@ int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) bytes -= vbo; if ((vbo & mask) || (bytes & mask)) { - /* We have to zero a range(s)*/ + /* We have to zero a range(s). */ if (frame_size == NULL) { - /* Caller insists range is aligned */ + /* Caller insists range is aligned. */ return -EINVAL; } *frame_size = mask + 1; -- cgit v1.2.3