fsntfs.c (78ab59fee07f22464f32eafebab2bd97ba94ff2d) fsntfs.c (d3624466b56dd5b1886c1dff500525b544c19c83)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 298 unchanged lines hidden (view full) ---

307 if (sbi->flags & NTFS_FLAGS_NEED_REPLAY) {
308 err = 0;
309 goto out;
310 }
311
312 if (sb_rdonly(sb) || !initialized)
313 goto out;
314
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 298 unchanged lines hidden (view full) ---

307 if (sbi->flags & NTFS_FLAGS_NEED_REPLAY) {
308 err = 0;
309 goto out;
310 }
311
312 if (sb_rdonly(sb) || !initialized)
313 goto out;
314
315 /* Fill LogFile by '-1' if it is initialized.ssss */
315 /* Fill LogFile by '-1' if it is initialized. */
316 err = ntfs_bio_fill_1(sbi, &ni->file.run);
317
318out:
319 sbi->flags &= ~NTFS_FLAGS_LOG_REPLAYING;
320
321 return err;
322}
323

--- 631 unchanged lines hidden (view full) ---

955 ni_unlock(ni);
956 if (err)
957 return err;
958
959 mark_inode_dirty(&ni->vfs_inode);
960 /* verify(!ntfs_update_mftmirr()); */
961
962 /*
316 err = ntfs_bio_fill_1(sbi, &ni->file.run);
317
318out:
319 sbi->flags &= ~NTFS_FLAGS_LOG_REPLAYING;
320
321 return err;
322}
323

--- 631 unchanged lines hidden (view full) ---

955 ni_unlock(ni);
956 if (err)
957 return err;
958
959 mark_inode_dirty(&ni->vfs_inode);
960 /* verify(!ntfs_update_mftmirr()); */
961
962 /*
963 * if we used wait=1, sync_inode_metadata waits for the io for the
963 * If we used wait=1, sync_inode_metadata waits for the io for the
964 * inode to finish. It hangs when media is removed.
965 * So wait=0 is sent down to sync_inode_metadata
964 * inode to finish. It hangs when media is removed.
965 * So wait=0 is sent down to sync_inode_metadata
966 * and filemap_fdatawrite is used for the data blocks
966 * and filemap_fdatawrite is used for the data blocks.
967 */
968 err = sync_inode_metadata(&ni->vfs_inode, 0);
969 if (!err)
970 err = filemap_fdatawrite(ni->vfs_inode.i_mapping);
971
972 return err;
973}
974

--- 937 unchanged lines hidden (view full) ---

1912 }
1913
1914 sds_size = inode->i_size;
1915
1916 /* Find the last valid Id. */
1917 sbi->security.next_id = SECURITY_ID_FIRST;
1918 /* Always write new security at the end of bucket. */
1919 sbi->security.next_off =
967 */
968 err = sync_inode_metadata(&ni->vfs_inode, 0);
969 if (!err)
970 err = filemap_fdatawrite(ni->vfs_inode.i_mapping);
971
972 return err;
973}
974

--- 937 unchanged lines hidden (view full) ---

1912 }
1913
1914 sds_size = inode->i_size;
1915
1916 /* Find the last valid Id. */
1917 sbi->security.next_id = SECURITY_ID_FIRST;
1918 /* Always write new security at the end of bucket. */
1919 sbi->security.next_off =
1920 ALIGN(sds_size - SecurityDescriptorsBlockSize, 16);
1920 ALIGN(sds_size - SecurityDescriptorsBlockSize, 16);
1921
1922 off = 0;
1923 ne = NULL;
1924
1925 for (;;) {
1926 u32 next_id;
1927
1928 err = indx_find_raw(indx_sii, ni, root_sii, &ne, &off, fnd_sii);

--- 581 unchanged lines hidden ---
1921
1922 off = 0;
1923 ne = NULL;
1924
1925 for (;;) {
1926 u32 next_id;
1927
1928 err = indx_find_raw(indx_sii, ni, root_sii, &ne, &off, fnd_sii);

--- 581 unchanged lines hidden ---