+5
−0
Loading
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT -------------------------------- As follows, moving cachefiles_ondemand_init_object() outside the parent dir lock also moves it before fscache_object_lookup_negative(). This causes FSCACHE_COOKIE_NO_DATA_YET to be cleared before setting it when creating a new data object. Eventually __fscache_read_or_alloc_page() reads the flag and returns -ENODATA causing the mount to fail. mount | kworker ----------------------------------------------- __fscache_read_or_alloc_page cachefiles_walk_to_object cachefiles_ondemand_init_object cachefiles_ondemand_send_req cachefiles_ondemand_copen clear_bit(FSCACHE_COOKIE_NO_DATA_YET) fscache_object_lookup_negative set_bit(FSCACHE_COOKIE_NO_DATA_YET) if (test_bit(FSCACHE_COOKIE_NO_DATA_YET)) object->cache->ops->allocate_page ret = -ENODATA Hence for newly created data objects whose size is not 0, clear the FSCACHE_COOKIE_NO_DATA_YET bit. Signed-off-by:Baokun Li <libaokun1@huawei.com>