ceph_atomic_open() in kernel client does lookup and open at the same
time. So it can open a symlink inode with mode CEPH_FILE_MODE_WR.
Open a symlink inode with mode CEPH_FILE_MODE_WR triggers assertion
in Locker::check_inode_max_size();
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
4d15eb12298e007744486e28924a6f0ae071bd06)
return;
}
- // can only open a dir with mode FILE_MODE_PIN, at least for now.
- if (cur->inode.is_dir())
+ // can only open non-regular inode with mode FILE_MODE_PIN, at least for now.
+ if (!cur->inode.is_file())
cmode = CEPH_FILE_MODE_PIN;
dout(10) << "open flags = " << flags