copy_up.c (b07d5cc93e1b28df47a72c519d09d0a836043613) copy_up.c (42dd69ae1af42cf72d167e63a039b8c63653eb7f)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 *
4 * Copyright (C) 2011 Novell Inc.
5 */
6
7#include <linux/module.h>
8#include <linux/fs.h>

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

1068 /*
1069 * With NFS export, copy up can get called for a disconnected non-dir.
1070 * In this case, we will copy up lower inode to index dir without
1071 * linking it to upper dir.
1072 */
1073 if (WARN_ON(disconnected && d_is_dir(dentry)))
1074 return -EIO;
1075
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 *
4 * Copyright (C) 2011 Novell Inc.
5 */
6
7#include <linux/module.h>
8#include <linux/fs.h>

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

1068 /*
1069 * With NFS export, copy up can get called for a disconnected non-dir.
1070 * In this case, we will copy up lower inode to index dir without
1071 * linking it to upper dir.
1072 */
1073 if (WARN_ON(disconnected && d_is_dir(dentry)))
1074 return -EIO;
1075
1076 /*
1077 * We may not need lowerdata if we are only doing metacopy up, but it is
1078 * not very important to optimize this case, so do lazy lowerdata lookup
1079 * before any copy up, so we can do it before taking ovl_inode_lock().
1080 */
1081 err = ovl_maybe_lookup_lowerdata(dentry);
1082 if (err)
1083 return err;
1084
1076 old_cred = ovl_override_creds(dentry->d_sb);
1077 while (!err) {
1078 struct dentry *next;
1079 struct dentry *parent = NULL;
1080
1081 if (ovl_already_copied_up(dentry, flags))
1082 break;
1083

--- 61 unchanged lines hidden ---
1085 old_cred = ovl_override_creds(dentry->d_sb);
1086 while (!err) {
1087 struct dentry *next;
1088 struct dentry *parent = NULL;
1089
1090 if (ovl_already_copied_up(dentry, flags))
1091 break;
1092

--- 61 unchanged lines hidden ---