xattr.c (e23c34bb41da65f354fb7eee04300c56ee48f60c) xattr.c (6bacf52fb58aeb3e89d9a62970b85a5570aa8ace)
1/*
2 * fs/f2fs/xattr.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * Portions of this code from linux/fs/ext2/xattr.c
8 *

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

517 /*
518 * If value is NULL, it is remove operation.
519 * In case of update operation, we caculate free.
520 */
521 free = MIN_OFFSET(inode) - ((char *)last - (char *)base_addr);
522 if (found)
523 free = free + ENTRY_SIZE(here);
524
1/*
2 * fs/f2fs/xattr.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * Portions of this code from linux/fs/ext2/xattr.c
8 *

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

517 /*
518 * If value is NULL, it is remove operation.
519 * In case of update operation, we caculate free.
520 */
521 free = MIN_OFFSET(inode) - ((char *)last - (char *)base_addr);
522 if (found)
523 free = free + ENTRY_SIZE(here);
524
525 if (free < newsize) {
525 if (unlikely(free < newsize)) {
526 error = -ENOSPC;
527 goto exit;
528 }
529 }
530
531 /* 2. Remove old entry */
532 if (found) {
533 /*

--- 63 unchanged lines hidden ---
526 error = -ENOSPC;
527 goto exit;
528 }
529 }
530
531 /* 2. Remove old entry */
532 if (found) {
533 /*

--- 63 unchanged lines hidden ---