index.c (78ab59fee07f22464f32eafebab2bd97ba94ff2d) | index.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> --- 2610 unchanged lines hidden (view full) --- 2619 if (diff) { 2620 err = -EINVAL; 2621 goto out; 2622 } 2623 2624 e_fname = (struct ATTR_FILE_NAME *)(e + 1); 2625 2626 if (!memcmp(&e_fname->dup, dup, sizeof(*dup))) { | 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> --- 2610 unchanged lines hidden (view full) --- 2619 if (diff) { 2620 err = -EINVAL; 2621 goto out; 2622 } 2623 2624 e_fname = (struct ATTR_FILE_NAME *)(e + 1); 2625 2626 if (!memcmp(&e_fname->dup, dup, sizeof(*dup))) { |
2627 /* Nothing to update in index! Try to avoid this call. */ | 2627 /* 2628 * Nothing to update in index! Try to avoid this call. 2629 */ |
2628 goto out; 2629 } 2630 2631 memcpy(&e_fname->dup, dup, sizeof(*dup)); 2632 2633 if (fnd->level) { | 2630 goto out; 2631 } 2632 2633 memcpy(&e_fname->dup, dup, sizeof(*dup)); 2634 2635 if (fnd->level) { |
2634 /* directory entry in index */ | 2636 /* Directory entry in index. */ |
2635 err = indx_write(indx, ni, fnd->nodes[fnd->level - 1], sync); 2636 } else { | 2637 err = indx_write(indx, ni, fnd->nodes[fnd->level - 1], sync); 2638 } else { |
2637 /* directory entry in directory MFT record */ | 2639 /* Directory entry in directory MFT record. */ |
2638 mi->dirty = true; 2639 if (sync) 2640 err = mi_write(mi, 1); 2641 else 2642 mark_inode_dirty(&ni->vfs_inode); 2643 } 2644 2645out: 2646 fnd_put(fnd); 2647 return err; 2648} | 2640 mi->dirty = true; 2641 if (sync) 2642 err = mi_write(mi, 1); 2643 else 2644 mark_inode_dirty(&ni->vfs_inode); 2645 } 2646 2647out: 2648 fnd_put(fnd); 2649 return err; 2650} |