libfs: Add simple_offset_rename() API
[linux-2.6-block.git] / mm / shmem.c
index 0aad0d9a621b80e7a3f758125806bfb64e984c12..c0fb65223963d5a2d0c69980a81853c40ebccf86 100644 (file)
@@ -3473,8 +3473,7 @@ static int shmem_rename2(struct mnt_idmap *idmap,
                        return error;
        }
 
-       simple_offset_remove(shmem_get_offset_ctx(old_dir), old_dentry);
-       error = simple_offset_add(shmem_get_offset_ctx(new_dir), old_dentry);
+       error = simple_offset_rename(old_dir, old_dentry, new_dir, new_dentry);
        if (error)
                return error;