xattr.c (292dd876ee765c478b27c93cc51e93a558ed58bf) | xattr.c (88dcb91177cfa5b26143a29074389a2aa259c7cf) |
---|---|
1/* 2 * Copyright (C) International Business Machines Corp., 2000-2004 3 * Copyright (C) Christoph Hellwig, 2002 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 920 unchanged lines hidden (view full) --- 929 return rc; 930 931 if (value == NULL) { /* empty EA, do not remove */ 932 value = ""; 933 value_len = 0; 934 } 935 936 tid = txBegin(inode->i_sb, 0); | 1/* 2 * Copyright (C) International Business Machines Corp., 2000-2004 3 * Copyright (C) Christoph Hellwig, 2002 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 920 unchanged lines hidden (view full) --- 929 return rc; 930 931 if (value == NULL) { /* empty EA, do not remove */ 932 value = ""; 933 value_len = 0; 934 } 935 936 tid = txBegin(inode->i_sb, 0); |
937 down(&ji->commit_sem); | 937 mutex_lock(&ji->commit_mutex); |
938 rc = __jfs_setxattr(tid, dentry->d_inode, name, value, value_len, 939 flags); 940 if (!rc) 941 rc = txCommit(tid, 1, &inode, 0); 942 txEnd(tid); | 938 rc = __jfs_setxattr(tid, dentry->d_inode, name, value, value_len, 939 flags); 940 if (!rc) 941 rc = txCommit(tid, 1, &inode, 0); 942 txEnd(tid); |
943 up(&ji->commit_sem); | 943 mutex_unlock(&ji->commit_mutex); |
944 945 return rc; 946} 947 948ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data, 949 size_t buf_size) 950{ 951 struct jfs_ea_list *ealist; --- 136 unchanged lines hidden (view full) --- 1088 struct jfs_inode_info *ji = JFS_IP(inode); 1089 int rc; 1090 tid_t tid; 1091 1092 if ((rc = can_set_xattr(inode, name, NULL, 0))) 1093 return rc; 1094 1095 tid = txBegin(inode->i_sb, 0); | 944 945 return rc; 946} 947 948ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data, 949 size_t buf_size) 950{ 951 struct jfs_ea_list *ealist; --- 136 unchanged lines hidden (view full) --- 1088 struct jfs_inode_info *ji = JFS_IP(inode); 1089 int rc; 1090 tid_t tid; 1091 1092 if ((rc = can_set_xattr(inode, name, NULL, 0))) 1093 return rc; 1094 1095 tid = txBegin(inode->i_sb, 0); |
1096 down(&ji->commit_sem); | 1096 mutex_lock(&ji->commit_mutex); |
1097 rc = __jfs_setxattr(tid, dentry->d_inode, name, NULL, 0, XATTR_REPLACE); 1098 if (!rc) 1099 rc = txCommit(tid, 1, &inode, 0); 1100 txEnd(tid); | 1097 rc = __jfs_setxattr(tid, dentry->d_inode, name, NULL, 0, XATTR_REPLACE); 1098 if (!rc) 1099 rc = txCommit(tid, 1, &inode, 0); 1100 txEnd(tid); |
1101 up(&ji->commit_sem); | 1101 mutex_unlock(&ji->commit_mutex); |
1102 1103 return rc; 1104} 1105 1106#ifdef CONFIG_JFS_SECURITY 1107int jfs_init_security(tid_t tid, struct inode *inode, struct inode *dir) 1108{ 1109 int rc; --- 30 unchanged lines hidden --- | 1102 1103 return rc; 1104} 1105 1106#ifdef CONFIG_JFS_SECURITY 1107int jfs_init_security(tid_t tid, struct inode *inode, struct inode *dir) 1108{ 1109 int rc; --- 30 unchanged lines hidden --- |