namei.c (5b79c2af667c0e2684f2a6dbf6439074b78f490c) namei.c (f6a4b4c9d07dda90c7c29dae96d6119ac6425dca)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * (C) 2001 Clemson University and The University of Chicago
4 *
5 * See COPYING in top-level directory.
6 */
7
8/*

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

321
322 inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref);
323 if (IS_ERR(inode)) {
324 gossip_err
325 ("*** Failed to allocate orangefs symlink inode\n");
326 ret = PTR_ERR(inode);
327 goto out;
328 }
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * (C) 2001 Clemson University and The University of Chicago
4 *
5 * See COPYING in top-level directory.
6 */
7
8/*

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

321
322 inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref);
323 if (IS_ERR(inode)) {
324 gossip_err
325 ("*** Failed to allocate orangefs symlink inode\n");
326 ret = PTR_ERR(inode);
327 goto out;
328 }
329 /*
330 * This is necessary because orangefs_inode_getattr will not
331 * re-read symlink size as it is impossible for it to change.
332 * Invalidating the cache does not help. orangefs_new_inode
333 * does not set the correct size (it does not know symname).
334 */
335 inode->i_size = strlen(symname);
329
330 gossip_debug(GOSSIP_NAME_DEBUG,
331 "Assigned symlink inode new number of %pU\n",
332 get_khandle_from_ino(inode));
333
334 d_instantiate_new(dentry, inode);
335 orangefs_set_timeout(dentry);
336 ORANGEFS_I(inode)->getattr_time = jiffies - 1;

--- 153 unchanged lines hidden ---
336
337 gossip_debug(GOSSIP_NAME_DEBUG,
338 "Assigned symlink inode new number of %pU\n",
339 get_khandle_from_ino(inode));
340
341 d_instantiate_new(dentry, inode);
342 orangefs_set_timeout(dentry);
343 ORANGEFS_I(inode)->getattr_time = jiffies - 1;

--- 153 unchanged lines hidden ---