util.c (818a23e3882b1bf65d1719e407be04716e69a4d5) util.c (e6d2ebddbc5205635a021a910f2f0e93bc2aa534)
1/*
2 * Copyright (C) 2011 Novell Inc.
3 * Copyright (C) 2016 Red Hat, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
8 */

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

225 /*
226 * Make sure upperdentry is consistent before making it visible to
227 * ovl_upperdentry_dereference().
228 */
229 smp_wmb();
230 oe->__upperdentry = upperdentry;
231}
232
1/*
2 * Copyright (C) 2011 Novell Inc.
3 * Copyright (C) 2016 Red Hat, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
8 */

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

225 /*
226 * Make sure upperdentry is consistent before making it visible to
227 * ovl_upperdentry_dereference().
228 */
229 smp_wmb();
230 oe->__upperdentry = upperdentry;
231}
232
233void ovl_inode_init(struct inode *inode, struct inode *realinode, bool is_upper)
233void ovl_inode_init(struct inode *inode, struct dentry *dentry)
234{
234{
235 struct inode *realinode = d_inode(ovl_dentry_real(dentry));
236 bool is_upper = ovl_dentry_upper(dentry);
237
235 WRITE_ONCE(inode->i_private, (unsigned long) realinode |
236 (is_upper ? OVL_ISUPPER_MASK : 0));
238 WRITE_ONCE(inode->i_private, (unsigned long) realinode |
239 (is_upper ? OVL_ISUPPER_MASK : 0));
240
241 ovl_copyattr(realinode, inode);
237}
238
239void ovl_inode_update(struct inode *inode, struct inode *upperinode)
240{
241 WARN_ON(!upperinode);
242 WARN_ON(!inode_unhashed(inode));
243 WRITE_ONCE(inode->i_private,
244 (unsigned long) upperinode | OVL_ISUPPER_MASK);

--- 117 unchanged lines hidden ---
242}
243
244void ovl_inode_update(struct inode *inode, struct inode *upperinode)
245{
246 WARN_ON(!upperinode);
247 WARN_ON(!inode_unhashed(inode));
248 WRITE_ONCE(inode->i_private,
249 (unsigned long) upperinode | OVL_ISUPPER_MASK);

--- 117 unchanged lines hidden ---