namei.c (355a47ae7ebcf9d605aa809b259d380422e81b8d) | namei.c (dcbb4c10e6d9693cc9d6fa493b4d130b66a60c7d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/namei.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/fs.h> --- 371 unchanged lines hidden (view full) --- 380 struct f2fs_sb_info *sbi = F2FS_I_SB(dir); 381 struct qstr dot = QSTR_INIT(".", 1); 382 struct qstr dotdot = QSTR_INIT("..", 2); 383 struct f2fs_dir_entry *de; 384 struct page *page; 385 int err = 0; 386 387 if (f2fs_readonly(sbi->sb)) { | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/namei.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/fs.h> --- 371 unchanged lines hidden (view full) --- 380 struct f2fs_sb_info *sbi = F2FS_I_SB(dir); 381 struct qstr dot = QSTR_INIT(".", 1); 382 struct qstr dotdot = QSTR_INIT("..", 2); 383 struct f2fs_dir_entry *de; 384 struct page *page; 385 int err = 0; 386 387 if (f2fs_readonly(sbi->sb)) { |
388 f2fs_msg(sbi->sb, KERN_INFO, 389 "skip recovering inline_dots inode (ino:%lu, pino:%u) " 390 "in readonly mountpoint", dir->i_ino, pino); | 388 f2fs_info(sbi, "skip recovering inline_dots inode (ino:%lu, pino:%u) in readonly mountpoint", 389 dir->i_ino, pino); |
391 return 0; 392 } 393 394 err = dquot_initialize(dir); 395 if (err) 396 return err; 397 398 f2fs_balance_fs(sbi, true); --- 80 unchanged lines hidden (view full) --- 479 if (f2fs_has_inline_dots(inode)) { 480 err = __recover_dot_dentries(inode, dir->i_ino); 481 if (err) 482 goto out_iput; 483 } 484 if (IS_ENCRYPTED(dir) && 485 (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && 486 !fscrypt_has_permitted_context(dir, inode)) { | 390 return 0; 391 } 392 393 err = dquot_initialize(dir); 394 if (err) 395 return err; 396 397 f2fs_balance_fs(sbi, true); --- 80 unchanged lines hidden (view full) --- 478 if (f2fs_has_inline_dots(inode)) { 479 err = __recover_dot_dentries(inode, dir->i_ino); 480 if (err) 481 goto out_iput; 482 } 483 if (IS_ENCRYPTED(dir) && 484 (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && 485 !fscrypt_has_permitted_context(dir, inode)) { |
487 f2fs_msg(inode->i_sb, KERN_WARNING, 488 "Inconsistent encryption contexts: %lu/%lu", 489 dir->i_ino, inode->i_ino); | 486 f2fs_warn(F2FS_I_SB(inode), "Inconsistent encryption contexts: %lu/%lu", 487 dir->i_ino, inode->i_ino); |
490 err = -EPERM; 491 goto out_iput; 492 } 493out_splice: 494 new = d_splice_alias(inode, dentry); 495 err = PTR_ERR_OR_ZERO(new); 496 trace_f2fs_lookup_end(dir, dentry, ino, err); 497 return new; --- 777 unchanged lines hidden --- | 488 err = -EPERM; 489 goto out_iput; 490 } 491out_splice: 492 new = d_splice_alias(inode, dentry); 493 err = PTR_ERR_OR_ZERO(new); 494 trace_f2fs_lookup_end(dir, dentry, ino, err); 495 return new; --- 777 unchanged lines hidden --- |