inode.c (1f2d9c9dd8276b1c19ef80e6d8059fe47506d4c3) | inode.c (730e908f3539066d4aa01f4720ebfc750ce4d045) |
---|---|
1/* 2 * inode.c - NILFS inode operations. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 787 unchanged lines hidden (view full) --- 796 797out_err: 798 nilfs_transaction_abort(sb); 799 return err; 800} 801 802int nilfs_permission(struct inode *inode, int mask, unsigned int flags) 803{ | 1/* 2 * inode.c - NILFS inode operations. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 787 unchanged lines hidden (view full) --- 796 797out_err: 798 nilfs_transaction_abort(sb); 799 return err; 800} 801 802int nilfs_permission(struct inode *inode, int mask, unsigned int flags) 803{ |
804 struct nilfs_root *root; 805 806 if (flags & IPERM_FLAG_RCU) 807 return -ECHILD; 808 809 root = NILFS_I(inode)->i_root; | 804 struct nilfs_root *root = NILFS_I(inode)->i_root; |
810 if ((mask & MAY_WRITE) && root && 811 root->cno != NILFS_CPTREE_CURRENT_CNO) 812 return -EROFS; /* snapshot is not writable */ 813 814 return generic_permission(inode, mask, flags, NULL); 815} 816 817int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh) --- 252 unchanged lines hidden --- | 805 if ((mask & MAY_WRITE) && root && 806 root->cno != NILFS_CPTREE_CURRENT_CNO) 807 return -EROFS; /* snapshot is not writable */ 808 809 return generic_permission(inode, mask, flags, NULL); 810} 811 812int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh) --- 252 unchanged lines hidden --- |